Skip to content

Commit ebdea15

Browse files
author
Nat Brown
committed
OpenVR 1.0.10
IVRCompositor: - New IVRCompositor::SetExplicitTimingMode and IVRCompositor::SubmitExplicitTimingData for DX12 (https://github.com/ValveSoftware/openvr/wiki/DirectX12#explicit-timing) and Vulkan (https://github.com/ValveSoftware/openvr/wiki/Vulkan#explicit-timing) - Adds Submit_TextureWithPose flag and VRTextureWithPose_t structure so applications can specify the pose the texture was rendered for when calling IVRCompositor::Submit IVROverlay: - New IVROverlay::CloseMessageOverlay for closing modal dashboard dialogs the process owns IVRSystem: - Adds context to IVRSystem::GetOutputDevice required to discriminate graphics device in Vulkan Miscellaneous - Fixes crashes under some multithreading circumstances using OpenVR VR_* APIs - Updates hellovr_vulkan sample to use IVRSystem::GetOutputDevice - Fixes a crash with hellovr_opengl sample under macOS [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4122485]
1 parent 5d0574b commit ebdea15

34 files changed

+744
-368
lines changed

bin/linux32/libopenvr_api.so

4.16 KB
Binary file not shown.

bin/linux32/libopenvr_api.so.dbg

14.5 KB
Binary file not shown.

bin/linux64/libopenvr_api.so

261 Bytes
Binary file not shown.

bin/linux64/libopenvr_api.so.dbg

13.1 KB
Binary file not shown.

bin/osx32/libopenvr_api.dylib

1.45 KB
Binary file not shown.
Binary file not shown.

bin/osx64/OpenVR.framework/Versions/A/Headers/openvr.h

+124-68
Large diffs are not rendered by default.

bin/osx64/OpenVR.framework/Versions/A/Headers/openvr_api.cs

+60-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public struct IVRSystem
5656
internal _GetDXGIOutputInfo GetDXGIOutputInfo;
5757

5858
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
59-
internal delegate void _GetOutputDevice(ref ulong pnDevice, ETextureType textureType);
59+
internal delegate void _GetOutputDevice(ref ulong pnDevice, ETextureType textureType, IntPtr pInstance);
6060
[MarshalAs(UnmanagedType.FunctionPtr)]
6161
internal _GetOutputDevice GetOutputDevice;
6262

@@ -845,6 +845,16 @@ public struct IVRCompositor
845845
[MarshalAs(UnmanagedType.FunctionPtr)]
846846
internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired;
847847

848+
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
849+
internal delegate void _SetExplicitTimingMode(bool bExplicitTimingMode);
850+
[MarshalAs(UnmanagedType.FunctionPtr)]
851+
internal _SetExplicitTimingMode SetExplicitTimingMode;
852+
853+
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
854+
internal delegate EVRCompositorError _SubmitExplicitTimingData();
855+
[MarshalAs(UnmanagedType.FunctionPtr)]
856+
internal _SubmitExplicitTimingData SubmitExplicitTimingData;
857+
848858
}
849859

850860
[StructLayout(LayoutKind.Sequential)]
@@ -1250,6 +1260,11 @@ public struct IVROverlay
12501260
[MarshalAs(UnmanagedType.FunctionPtr)]
12511261
internal _ShowMessageOverlay ShowMessageOverlay;
12521262

1263+
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
1264+
internal delegate void _CloseMessageOverlay();
1265+
[MarshalAs(UnmanagedType.FunctionPtr)]
1266+
internal _CloseMessageOverlay CloseMessageOverlay;
1267+
12531268
}
12541269

12551270
[StructLayout(LayoutKind.Sequential)]
@@ -1551,10 +1566,10 @@ public void GetDXGIOutputInfo(ref int pnAdapterIndex)
15511566
pnAdapterIndex = 0;
15521567
FnTable.GetDXGIOutputInfo(ref pnAdapterIndex);
15531568
}
1554-
public void GetOutputDevice(ref ulong pnDevice,ETextureType textureType)
1569+
public void GetOutputDevice(ref ulong pnDevice,ETextureType textureType,IntPtr pInstance)
15551570
{
15561571
pnDevice = 0;
1557-
FnTable.GetOutputDevice(ref pnDevice,textureType);
1572+
FnTable.GetOutputDevice(ref pnDevice,textureType,pInstance);
15581573
}
15591574
public bool IsDisplayOnDesktop()
15601575
{
@@ -1667,6 +1682,7 @@ struct PollNextEventUnion
16671682
}
16681683
public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
16691684
{
1685+
#if !UNITY_METRO
16701686
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
16711687
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
16721688
{
@@ -1679,6 +1695,7 @@ public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
16791695
event_packed.Unpack(ref pEvent);
16801696
return packed_result;
16811697
}
1698+
#endif
16821699
bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent);
16831700
return result;
16841701
}
@@ -1711,6 +1728,7 @@ struct GetControllerStateUnion
17111728
}
17121729
public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize)
17131730
{
1731+
#if !UNITY_METRO
17141732
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
17151733
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
17161734
{
@@ -1723,6 +1741,7 @@ public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerStat
17231741
state_packed.Unpack(ref pControllerState);
17241742
return packed_result;
17251743
}
1744+
#endif
17261745
bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
17271746
return result;
17281747
}
@@ -1740,6 +1759,7 @@ struct GetControllerStateWithPoseUnion
17401759
}
17411760
public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)
17421761
{
1762+
#if !UNITY_METRO
17431763
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
17441764
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
17451765
{
@@ -1752,6 +1772,7 @@ public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unCo
17521772
state_packed.Unpack(ref pControllerState);
17531773
return packed_result;
17541774
}
1775+
#endif
17551776
bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
17561777
return result;
17571778
}
@@ -2439,6 +2460,15 @@ public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,System.Text
24392460
uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysicalDevice,pchValue,unBufferSize);
24402461
return result;
24412462
}
2463+
public void SetExplicitTimingMode(bool bExplicitTimingMode)
2464+
{
2465+
FnTable.SetExplicitTimingMode(bExplicitTimingMode);
2466+
}
2467+
public EVRCompositorError SubmitExplicitTimingData()
2468+
{
2469+
EVRCompositorError result = FnTable.SubmitExplicitTimingData();
2470+
return result;
2471+
}
24422472
}
24432473

24442474

@@ -2705,6 +2735,7 @@ struct PollNextOverlayEventUnion
27052735
}
27062736
public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent)
27072737
{
2738+
#if !UNITY_METRO
27082739
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
27092740
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
27102741
{
@@ -2717,6 +2748,7 @@ public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint
27172748
event_packed.Unpack(ref pEvent);
27182749
return packed_result;
27192750
}
2751+
#endif
27202752
bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref pEvent,uncbVREvent);
27212753
return result;
27222754
}
@@ -2895,6 +2927,10 @@ public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCapt
28952927
VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchText,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text);
28962928
return result;
28972929
}
2930+
public void CloseMessageOverlay()
2931+
{
2932+
FnTable.CloseMessageOverlay();
2933+
}
28982934
}
28992935

29002936

@@ -2981,6 +3017,7 @@ struct GetComponentStateUnion
29813017
}
29823018
public bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
29833019
{
3020+
#if !UNITY_METRO
29843021
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
29853022
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
29863023
{
@@ -2993,6 +3030,7 @@ public bool GetComponentState(string pchRenderModelName,string pchComponentName,
29933030
state_packed.Unpack(ref pControllerState);
29943031
return packed_result;
29953032
}
3033+
#endif
29963034
bool result = FnTable.GetComponentState(pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState);
29973035
return result;
29983036
}
@@ -3344,6 +3382,7 @@ public enum ETrackedDeviceProperty
33443382
Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
33453383
Prop_DisplayDebugMode_Bool = 2044,
33463384
Prop_GraphicsAdapterLuid_Uint64 = 2045,
3385+
Prop_DriverProvidedChaperonePath_String = 2048,
33473386
Prop_AttachedDeviceId_String = 3000,
33483387
Prop_SupportedButtons_Uint64 = 3001,
33493388
Prop_Axis0Type_Int32 = 3002,
@@ -3401,6 +3440,7 @@ public enum EVRSubmitFlags
34013440
Submit_LensDistortionAlreadyApplied = 1,
34023441
Submit_GlRenderBuffer = 2,
34033442
Submit_Reserved = 4,
3443+
Submit_TextureWithPose = 8,
34043444
}
34053445
public enum EVRState
34063446
{
@@ -3429,6 +3469,8 @@ public enum EVREventType
34293469
VREvent_WatchdogWakeUpRequested = 109,
34303470
VREvent_LensDistortionChanged = 110,
34313471
VREvent_PropertyChanged = 111,
3472+
VREvent_WirelessDisconnect = 112,
3473+
VREvent_WirelessReconnect = 113,
34323474
VREvent_ButtonPress = 200,
34333475
VREvent_ButtonUnpress = 201,
34343476
VREvent_ButtonTouch = 202,
@@ -3526,6 +3568,7 @@ public enum EVREventType
35263568
VREvent_PerformanceTest_DisableCapture = 1601,
35273569
VREvent_PerformanceTest_FidelityLevel = 1602,
35283570
VREvent_MessageOverlay_Closed = 1650,
3571+
VREvent_MessageOverlayCloseRequested = 1651,
35293572
VREvent_VendorSpecific_Reserved_Start = 10000,
35303573
VREvent_VendorSpecific_Reserved_End = 19999,
35313574
}
@@ -3683,6 +3726,9 @@ public enum EVRInitError
36833726
Init_VRDashboardStartupFailed = 134,
36843727
Init_VRHomeNotFound = 135,
36853728
Init_VRHomeStartupFailed = 136,
3729+
Init_RebootingBusy = 137,
3730+
Init_FirmwareUpdateBusy = 138,
3731+
Init_FirmwareRecoveryBusy = 139,
36863732
Driver_Failed = 200,
36873733
Driver_Unknown = 201,
36883734
Driver_HmdUnknown = 202,
@@ -3785,6 +3831,7 @@ public enum EVRApplicationError
37853831
OldApplicationQuitting = 112,
37863832
TransitionAborted = 113,
37873833
IsTemplate = 114,
3834+
SteamVRIsExiting = 115,
37883835
BufferTooSmall = 200,
37893836
PropertyNotSet = 201,
37903837
UnknownProperty = 202,
@@ -3806,6 +3853,7 @@ public enum EVRApplicationProperty
38063853
IsTemplate_Bool = 61,
38073854
IsInstanced_Bool = 62,
38083855
IsInternal_Bool = 63,
3856+
WantsCompositorPauseInStandby_Bool = 64,
38093857
LastLaunchTime_Uint64 = 70,
38103858
}
38113859
public enum EVRApplicationTransitionState
@@ -3850,6 +3898,7 @@ public enum EVRCompositorError
38503898
SharedTexturesNotSupported = 106,
38513899
IndexOutOfRange = 107,
38523900
AlreadySubmitted = 108,
3901+
InvalidBounds = 109,
38533902
}
38543903
public enum VROverlayInputMethod
38553904
{
@@ -4120,6 +4169,10 @@ public enum EVRScreenshotError
41204169
public float uMax;
41214170
public float vMax;
41224171
}
4172+
[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPose_t
4173+
{
4174+
public HmdMatrix34_t mDeviceToAbsoluteTracking;
4175+
}
41234176
[StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t
41244177
{
41254178
public ulong m_nImage;
@@ -4601,7 +4654,7 @@ public static uint GetInitToken()
46014654
public const uint k_unControllerStateAxisCount = 5;
46024655
public const ulong k_ulOverlayHandleInvalid = 0;
46034656
public const uint k_unScreenshotHandleInvalid = 0;
4604-
public const string IVRSystem_Version = "IVRSystem_016";
4657+
public const string IVRSystem_Version = "IVRSystem_017";
46054658
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
46064659
public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003";
46074660
public const uint k_unMaxApplicationKeyLength = 128;
@@ -4610,7 +4663,7 @@ public static uint GetInitToken()
46104663
public const string IVRApplications_Version = "IVRApplications_006";
46114664
public const string IVRChaperone_Version = "IVRChaperone_003";
46124665
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
4613-
public const string IVRCompositor_Version = "IVRCompositor_020";
4666+
public const string IVRCompositor_Version = "IVRCompositor_021";
46144667
public const uint k_unVROverlayMaxKeyLength = 128;
46154668
public const uint k_unVROverlayMaxNameLength = 128;
46164669
public const uint k_unMaxOverlayCount = 64;
@@ -4669,6 +4722,7 @@ public static uint GetInitToken()
46694722
public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
46704723
public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
46714724
public const string k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
4725+
public const string k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync";
46724726
public const string k_pch_Lighthouse_Section = "driver_lighthouse";
46734727
public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
46744728
public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
@@ -4742,6 +4796,7 @@ public static uint GetInitToken()
47424796
public const string k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
47434797
public const string k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
47444798
public const string k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
4799+
public const string k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
47454800
public const string k_pch_Dashboard_Section = "dashboard";
47464801
public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
47474802
public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";

0 commit comments

Comments
 (0)