-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SteamVR is handing DriverDirectModeComponent textures it didn't allocate #1884
Comments
That's a really curious behavior. OpenVR applications create their own swapchain textures. This behvior could be an optimization to avoid double-allocating textures. I'm guessing this double-allocation is the main reason why a lot of users on Windows have worse performance with streaming headsets when using SteamVR with third-party drivers. It would sense for Valve to improve this. I'm curious what happens if you run an OpenXR application. OpenXR shifts the responsibility to create textures to the runtime, so it might pass the call to CreateSwapTextureSet. |
As an additional oddity, there's also this line in the log specifying a max texture size larger than the one it then asks to allocate.
This isn't really a problem that I care about, but it's odd. |
That message just logs what the minimum resolution is for the compositor to use the advanced supersampling filter (which downsamples the output with a box filter instead of regular bilinear). It has nothing to do with what resolution the application actually outputs. |
It has to work somehow differently on windows. Looking into the drivers there, It looks like valve is doing an FNV hash (based on the constants) of the texture (maybe even the bounds, but that seems nonsensical to me) and producing an error ( Since the driver works on Windows, this must be a behavioral difference between the two implementations. Unfortunately, there's no documentation anywhere for what to do about it. |
I spent half the day looking into the problem in the bytecode of vrclient. It looks like this is a harcoded behavior in the Linux vrclient. The windows vrclient connects to the vrserver process and asks it for textures as evidenced by the following log taken from Windows. Note that we see the vrcompositor create a set first and the steamtours application then creates it's own afterwards. This sort of matches the architecture we see on Linux, except for how steamtours allocates its texture.
Looking into the why. Steamtours allocates textures through vrclient. At some point it calls It looks to just be an oversight in the structure of the code. To me (as an uninformed guy just looking at bytecode) it looks like the code below This is unfortunately quite difficult for me to work around as I don't get any of the texture details, and there's no published interface to query for them. I might be able to find something in the code, but it's a hassle. |
Hey,
I've implemented a driver that uses the DriverDirectModeComponent for linux. From what I can read of the documentation in the headers, I'm supposed to get the textures I allocate in CreateSwapTextureSet back in SubmitLayer, instead it looks like I'm getting textures that I didn't allocate.
During startup I create 2 texture sets (as a response to CreateSwapTextureSet calls). These seem to be used for the "void" before the steamtours application launches.
Once that launches, there's a brief fade, and steamtours allocates it's own texture sets and the vrserver starts submitting those to me
Is this expected behavior? It doesn't seem to align with the documentation, but I know the Linux implementation is quite different from the Windows one, and it's possible the documentation isn't correct for Linux.
The text was updated successfully, but these errors were encountered: