ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.15k stars 1.28k forks source link

'Throttling Behaviour'/'Lock application framerate to (max fps)' setting in SteamVR no longer supported #1657

Open TheDeveloperGuy opened 2 years ago

TheDeveloperGuy commented 2 years ago

When using a HDMI/DP connected headset in VR-Direct mode, there used to be a per-application throttling setting, which is no longer available in recent SteamVR versions. According to a customer that contacted Valve for support on this issue, it is due to my driver "no longer supporting this feature".

In true OpenVR/SteamVR fashion there is zero documentation on this and mentions of it in the headers appear to be for applications and not drivers. As I certainly didn't change anything in this regard, and as the driver is using IVRDisplayComponent for the headset, I don't know what I'm supposed to do to "fix" this.

Rectus commented 2 years ago

Seems like IVRDriverDirectModeComponent got updated to version 008 in version 1.21.7, while the public headers are still on version 007. Not sure if you can do anything until Valve releases the updated headers.

TheDeveloperGuy commented 2 years ago

Interesting. However this is not using that mode.

Unfortunate naming choice for that mode though, which is "Driver-Direct", rather than "VR-Direct" (which uses IVRDisplayComponent, as does "Extended"). That has caused endless confusion over the years for developers. "Driver-Direct" bypasses SteamVR compositor, "VR-Direct" bypasses Windows display system. A driver could use both (eg. WMR or Oculus), but this does not.

Rectus commented 2 years ago

In that case the support might be wrong about it. I'd bet on it being something hardcoded in SteamVR. None of the other driver interfaces seem to have been updates in quite awhile (apart from IVRCameraPassThruInternal_001 being added).

TheDeveloperGuy commented 2 years ago

Yes, the changes to "Driver-Direct" are almost certainly for Oculus, as that is the primary client of that interface. Most likely the additions are not useful for general "Driver-Direct" headsets, and so I expect that is why they have not been made public (yet). I do use it too, for some headsets, but not for the one in question here.

TheDeveloperGuy commented 2 years ago

In that case the support might be wrong about it.

I will test with Index, as that is the primary client of the IVRDisplayComponent interface AFAIK.

Rectus commented 2 years ago

I just thought of another possibility. Looking at it, there seems to be an undocumented Prop_SupportsAppThrottling_Bool property. I don't know the number for it in the enum, but guessing it might be the next one in the HMD property range. Of course there might be something more required for it to work now, although if it worked before, maybe just flipping it on might make it work again.

TheDeveloperGuy commented 2 years ago

Could be, seems reasonable. Not sure what the headset driver can do to support or not support frame-doubling, particularly if it used to without support code. Will test Index before randomly setting undocumented properties. Would certainly be less like shooting in the dark with an actual enum value though. If Index does still do it, can hook its driver and see which properties it's setting. Or wait (perhaps an infinite amount of time) for a Valve dev to respond. Or call one: @JoeLudwig

aleiby commented 2 years ago

IVRDriverDirectModeComponent.PostPresent has been updated to take throttling parameters now. If you set Prop_SupportsAppThrottling_Bool then the per-app settings to control this behavior will start showing up. It is up to the driver to actually handle throttling, etc. appropriately.

https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_driver.h#L2869

TheDeveloperGuy commented 2 years ago

@aleiby Thanks, is there any documentation or even a hint on what exactly the driver is supposed to do with the throttling parameters?

TheDeveloperGuy commented 2 years ago

@aleiby Of course, this topic isn't even discussing "Driver-Direct" drivers, so the throttling parameters are not relevant for the "VR-Direct" driver mode being discussed. But as my driver handles both modes, it is relevant information for me.