Skip to content

Commit

Permalink
# OpenVR SDK 1.14.15
Browse files Browse the repository at this point in the history
New events:
* VREvent_DesktopViewUpdating
* VREvent_DesktopViewReady

IVRDriverDirectModeComponent:
* Updated CreateSwapTextureSet to (optionally) allow NTHandle support

IVRServerDriverHost:
  * Added SetDisplayProjectionRaw
  * Added SetRecommendedRenderTargetSize
  * Renamed TrackedDeviceDisplayTransformUpdated -> SetDisplayEyeToHead

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 6100641]
  • Loading branch information
jeremyselan committed Sep 18, 2020
1 parent 793739c commit 0eb7032
Show file tree
Hide file tree
Showing 30 changed files with 86 additions and 20 deletions.
Binary file modified bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux32/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linuxarm64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linuxarm64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linuxarm64/libopenvr_api_unity.so
Binary file not shown.
Binary file modified bin/linuxarm64/libopenvr_api_unity.so.dbg
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll.sig
Binary file not shown.
Binary file modified bin/win32/openvr_api.pdb
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll.sig
Binary file not shown.
Binary file modified bin/win64/openvr_api.pdb
Binary file not shown.
10 changes: 7 additions & 3 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
static const uint32_t k_nSteamVRVersionMinor = 13;
static const uint32_t k_nSteamVRVersionBuild = 10;
static const uint32_t k_nSteamVRVersionMinor = 14;
static const uint32_t k_nSteamVRVersionBuild = 15;
} // namespace vr

// vrtypes.h
Expand Down Expand Up @@ -469,7 +469,8 @@ enum ETrackedDeviceProperty

Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
Prop_Audio_DefaultRecordingDeviceId_String = 2301,
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,

// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
Expand Down Expand Up @@ -784,6 +785,8 @@ enum EVREventType
VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled
VREvent_ShowUI = 528, // data is showUi
VREvent_ShowDevTools = 529, // data is showDevTools
VREvent_DesktopViewUpdating = 530,
VREvent_DesktopViewReady = 531,

VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
Expand Down Expand Up @@ -2829,6 +2832,7 @@ namespace vr
static const char * const k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume";
static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
static const char * const k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";

//-----------------------------------------------------------------------------
// power management keys
Expand Down
5 changes: 5 additions & 0 deletions headers/openvr_api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4719,6 +4719,7 @@ public enum ETrackedDeviceProperty
Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
Prop_Audio_DefaultRecordingDeviceId_String = 2301,
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,
Prop_AttachedDeviceId_String = 3000,
Prop_SupportedButtons_Uint64 = 3001,
Prop_Axis0Type_Int32 = 3002,
Expand Down Expand Up @@ -4885,6 +4886,8 @@ public enum EVREventType
VREvent_RoomViewHidden = 527,
VREvent_ShowUI = 528,
VREvent_ShowDevTools = 529,
VREvent_DesktopViewUpdating = 530,
VREvent_DesktopViewReady = 531,
VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
VREvent_Notification_BeginInteraction = 602,
Expand Down Expand Up @@ -7699,6 +7702,7 @@ public static uint GetInitToken()
public const string k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume";
public const string k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
public const string k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
public const string k_pch_Power_Section = "power";
public const string k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
public const string k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
Expand Down Expand Up @@ -7773,6 +7777,7 @@ public static uint GetInitToken()
public const string k_pchPathBoundTrackerRole = "/bound_tracker_role";
public const string k_pchPathPoseRaw = "/pose/raw";
public const string k_pchPathPoseTip = "/pose/tip";
public const string k_pchPathPoseGrip = "/pose/grip";
public const string k_pchPathSystemButtonClick = "/input/system/click";
public const string k_pchPathProximity = "/proximity";
public const string k_pchPathControllerTypePrefix = "/controller_type/";
Expand Down
7 changes: 7 additions & 0 deletions headers/openvr_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
,{"name": "Prop_Audio_DefaultPlaybackDeviceId_String","value": "2300"}
,{"name": "Prop_Audio_DefaultRecordingDeviceId_String","value": "2301"}
,{"name": "Prop_Audio_DefaultPlaybackDeviceVolume_Float","value": "2302"}
,{"name": "Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool","value": "2303"}
,{"name": "Prop_AttachedDeviceId_String","value": "3000"}
,{"name": "Prop_SupportedButtons_Uint64","value": "3001"}
,{"name": "Prop_Axis0Type_Int32","value": "3002"}
Expand Down Expand Up @@ -413,6 +414,8 @@
,{"name": "VREvent_RoomViewHidden","value": "527"}
,{"name": "VREvent_ShowUI","value": "528"}
,{"name": "VREvent_ShowDevTools","value": "529"}
,{"name": "VREvent_DesktopViewUpdating","value": "530"}
,{"name": "VREvent_DesktopViewReady","value": "531"}
,{"name": "VREvent_Notification_Shown","value": "600"}
,{"name": "VREvent_Notification_Hidden","value": "601"}
,{"name": "VREvent_Notification_BeginInteraction","value": "602"}
Expand Down Expand Up @@ -1698,6 +1701,8 @@
"constname": "k_pch_audio_LastHmdPlaybackDeviceId_String","consttype": "const char *const", "constval": "lastHmdPlaybackDeviceId"}
,{
"constname": "k_pch_audio_VIVEHDMIGain","consttype": "const char *const", "constval": "viveHDMIGain"}
,{
"constname": "k_pch_audio_DualSpeakerAndJackOutput_Bool","consttype": "const char *const", "constval": "dualSpeakerAndJackOutput"}
,{
"constname": "k_pch_Power_Section","consttype": "const char *const", "constval": "power"}
,{
Expand Down Expand Up @@ -1846,6 +1851,8 @@
"constname": "k_pchPathPoseRaw","consttype": "const char *", "constval": "/pose/raw"}
,{
"constname": "k_pchPathPoseTip","consttype": "const char *", "constval": "/pose/tip"}
,{
"constname": "k_pchPathPoseGrip","consttype": "const char *", "constval": "/pose/grip"}
,{
"constname": "k_pchPathSystemButtonClick","consttype": "const char *", "constval": "/input/system/click"}
,{
Expand Down
5 changes: 5 additions & 0 deletions headers/openvr_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ static const char * k_pch_audio_ActiveMirrorDevice_String = "activePlaybackMirro
static const char * k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume";
static const char * k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
static const char * k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
static const char * k_pch_Power_Section = "power";
static const char * k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
static const char * k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
Expand Down Expand Up @@ -372,6 +373,7 @@ static const char * k_pchPathBoundTrackerAliasPath = "/bound_tracker_path";
static const char * k_pchPathBoundTrackerRole = "/bound_tracker_role";
static const char * k_pchPathPoseRaw = "/pose/raw";
static const char * k_pchPathPoseTip = "/pose/tip";
static const char * k_pchPathPoseGrip = "/pose/grip";
static const char * k_pchPathSystemButtonClick = "/input/system/click";
static const char * k_pchPathProximity = "/proximity";
static const char * k_pchPathControllerTypePrefix = "/controller_type/";
Expand Down Expand Up @@ -627,6 +629,7 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
ETrackedDeviceProperty_Prop_Audio_DefaultRecordingDeviceId_String = 2301,
ETrackedDeviceProperty_Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
ETrackedDeviceProperty_Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,
ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
Expand Down Expand Up @@ -798,6 +801,8 @@ typedef enum EVREventType
EVREventType_VREvent_RoomViewHidden = 527,
EVREventType_VREvent_ShowUI = 528,
EVREventType_VREvent_ShowDevTools = 529,
EVREventType_VREvent_DesktopViewUpdating = 530,
EVREventType_VREvent_DesktopViewReady = 531,
EVREventType_VREvent_Notification_Shown = 600,
EVREventType_VREvent_Notification_Hidden = 601,
EVREventType_VREvent_Notification_BeginInteraction = 602,
Expand Down
49 changes: 36 additions & 13 deletions headers/openvr_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
static const uint32_t k_nSteamVRVersionMinor = 13;
static const uint32_t k_nSteamVRVersionBuild = 10;
static const uint32_t k_nSteamVRVersionMinor = 14;
static const uint32_t k_nSteamVRVersionBuild = 15;
} // namespace vr

// vrtypes.h
Expand Down Expand Up @@ -469,7 +469,8 @@ enum ETrackedDeviceProperty

Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
Prop_Audio_DefaultRecordingDeviceId_String = 2301,
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,

// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
Expand Down Expand Up @@ -784,6 +785,8 @@ enum EVREventType
VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled
VREvent_ShowUI = 528, // data is showUi
VREvent_ShowDevTools = 529, // data is showDevTools
VREvent_DesktopViewUpdating = 530,
VREvent_DesktopViewReady = 531,

VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
Expand Down Expand Up @@ -2422,6 +2425,7 @@ namespace vr
static const char * const k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume";
static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
static const char * const k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";

//-----------------------------------------------------------------------------
// power management keys
Expand Down Expand Up @@ -2679,12 +2683,15 @@ namespace vr
// ivrdriverdirectmodecomponent.h
namespace vr
{

enum VRSwapTextureFlag
{
// Specify that the shared texture resource was created with the SHARED_NTHANDLE option (Windows)
VRSwapTextureFlag_Shared_NTHandle = 1 << 0,
};

// ----------------------------------------------------------------------------------------------
// Purpose: This component is used for drivers that implement direct mode entirely on their own
// without allowing the VR Compositor to own the window/device. Chances are you don't
// need to implement this component in your driver.
// without allowing the VR Compositor to own the window/device.
// ----------------------------------------------------------------------------------------------
class IVRDriverDirectModeComponent
{
Expand All @@ -2694,15 +2701,22 @@ namespace vr
// Direct mode methods
// -----------------------------------

/** Specific to Oculus compositor support, textures supplied must be created using this method. */
struct SwapTextureSetDesc_t
{
uint32_t nWidth;
uint32_t nHeight;
uint32_t nFormat;
uint32_t nSampleCount;
};
virtual void CreateSwapTextureSet( uint32_t unPid, const SwapTextureSetDesc_t *pSwapTextureSetDesc, vr::SharedTextureHandle_t( *pSharedTextureHandles )[ 3 ] ) {}

struct SwapTextureSet_t
{
vr::SharedTextureHandle_t rSharedTextureHandles[ 3 ];
uint32_t unTextureFlags;
};

/** Called to allocate textures for applications to render into. One of these per eye will be passed back to SubmitLayer each frame. */
virtual void CreateSwapTextureSet( uint32_t unPid, const SwapTextureSetDesc_t *pSwapTextureSetDesc, SwapTextureSet_t *pOutSwapTextureSet ) {}

/** Used to textures created using CreateSwapTextureSet. Only one of the set's handles needs to be used to destroy the entire set. */
virtual void DestroySwapTextureSet( vr::SharedTextureHandle_t sharedTextureHandle ) {}
Expand Down Expand Up @@ -2741,7 +2755,7 @@ namespace vr
virtual void GetFrameTiming( DriverDirectMode_FrameTiming *pFrameTiming ) {}
};

static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_006";
static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_007";

}

Expand Down Expand Up @@ -3452,18 +3466,27 @@ class IVRServerDriverHost
* other properties can be looked up via IVRProperties. */
virtual void GetRawTrackedDevicePoses( float fPredictedSecondsFromNow, TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0;

/** Notifies the server that a tracked device's display component transforms have been updated. */
virtual void TrackedDeviceDisplayTransformUpdated( uint32_t unWhichDevice, HmdMatrix34_t eyeToHeadLeft, HmdMatrix34_t eyeToHeadRight ) = 0;

/** Requests that SteamVR be restarted. The provided reason will be displayed to the user and should be in the current locale. */
virtual void RequestRestart( const char *pchLocalizedReason, const char *pchExecutableToStart, const char *pchArguments, const char *pchWorkingDirectory ) = 0;

/** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame.
* Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */
virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0;

/** Notifies the server that a tracked device's display component transforms have been updated.
* only permitted on devices of the HMD class. */
virtual void SetDisplayEyeToHead( uint32_t unWhichDevice, const HmdMatrix34_t & eyeToHeadLeft, const HmdMatrix34_t & eyeToHeadRight ) = 0;

/** Notifies the server that a tracked device's display projection has changed.
* only permitted on devices of the HMD class. */
virtual void SetDisplayProjectionRaw( uint32_t unWhichDevice, const HmdRect2_t & eyeLeft, const HmdRect2_t & eyeRight ) = 0;

/** Notifies the server that a tracked device's recommended render target resolution has changed.
* only permitted on devices of the HMD class. */
virtual void SetRecommendedRenderTargetSize( uint32_t unWhichDevice, uint32_t nWidth, uint32_t nHeight ) = 0;
};

static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_005";
static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_006";

}

Expand Down
Binary file modified lib/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified lib/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified lib/linuxarm64/libopenvr_api.so
Binary file not shown.
Binary file modified lib/linuxarm64/libopenvr_api_unity.so
Binary file not shown.
Binary file modified samples/bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified samples/bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified samples/bin/linuxarm64/libopenvr_api.so
Binary file not shown.
Binary file modified samples/bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified samples/bin/win64/openvr_api.dll
Binary file not shown.
26 changes: 23 additions & 3 deletions src/vrcommon/sharedlibtools_public.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,33 @@
#include <dlfcn.h>
#endif

SharedLibHandle SharedLib_Load( const char *pchPath )

SharedLibHandle SharedLib_Load( const char *pchPath, uint32_t *pErrorCode )
{
SharedLibHandle pHandle = nullptr;
#if defined( _WIN32)
pHandle = ( SharedLibHandle )LoadLibraryEx( pchPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH );
#elif defined(POSIX)
pHandle = (SharedLibHandle) dlopen(pchPath, RTLD_LOCAL|RTLD_NOW);
#endif

if ( pErrorCode )
{
if ( pHandle == nullptr )
{
#if defined( _WIN32)
return (SharedLibHandle)LoadLibraryEx( pchPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH );
*pErrorCode = ( uint32_t ) GetLastError();
#elif defined(POSIX)
return (SharedLibHandle)dlopen(pchPath, RTLD_LOCAL|RTLD_NOW);
*pErrorCode = 1;
#endif
}
else
{
*pErrorCode = 0;
}
}

return pHandle;
}

void *SharedLib_GetFunction( SharedLibHandle lib, const char *pchFunctionName)
Expand Down
4 changes: 3 additions & 1 deletion src/vrcommon/sharedlibtools_public.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
//========= Copyright Valve Corporation ============//
#pragma once

#include <stdint.h>

typedef void *SharedLibHandle;

SharedLibHandle SharedLib_Load( const char *pchPath );
SharedLibHandle SharedLib_Load( const char *pchPath, uint32_t *pErrorCode = nullptr );
void *SharedLib_GetFunction( SharedLibHandle lib, const char *pchFunctionName);
void SharedLib_Unload( SharedLibHandle lib );

Expand Down

0 comments on commit 0eb7032

Please sign in to comment.