Skip to content

Commit

Permalink
# OpenVR SDK 1.26.7
Browse files Browse the repository at this point in the history
IVROverlay:
* Removed defunct GetOverlayTransformOverlayRelative and SetOverlayTransformOverlayRelative interfaces

EVREventType:
* Removed defunct VREvent_SceneFocusChanged
* Added VREvent_SceneAppPipeDisconnected - Called when the scene app's pipe has been closed (data is process)

ETrackedDeviceProperty:
* Added Prop_Hmd_SupportsHDR10_Bool
* Added Prop_Hmd_EnableParallelRenderCameras_Bool (drivers can set this compensate for canted and/or clocked displays)
* Added Prop_DriverProvidedChaperoneJson_String (overrides Prop_DriverProvidedChaperonePath_String)
* Renamed Prop_Hmd_SupportsRoomViewDirect_Bool
* Renamed Prop_Hmd_SupportsAppThrottling_Bool
* Added Prop_Hmd_SupportsGpuBusMonitoring_Bool
* Added Prop_DSCVersion_Int32
* Added Prop_DSCSliceCount_Int32
* Added Prop_DSCBPPx16_Int32

VROverlayTransformType:
* Removed defunct VROverlayTransform_SystemOverlay
* Added VROverlayTransform_Subview

Compositor_CumulativeStats:
* Added m_nNumFrameSubmits
* Added m_flSumCompositorCPUTimeMS
* Added m_flSumCompositorGPUTimeMS
* Added m_flSumTargetFrameTimes
* Added m_flSumApplicationCPUTimeMS
* Added m_flSumApplicationGPUTimeMS
* Added m_nNumFramesWithDepth

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 8250329]
  • Loading branch information
aaronleiby committed Aug 8, 2023
1 parent 32dcadc commit 751538d
Show file tree
Hide file tree
Showing 29 changed files with 396 additions and 262 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.
15 changes: 13 additions & 2 deletions codegen/openvr_capi.h.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#endif
// OPENVR API export macro
#if defined( _WIN32 ) && !defined( _X360 )
#if defined( _WIN32 )
#if defined( OPENVR_API_EXPORTS )
#define S_API EXTERN_C __declspec( dllexport )
#elif defined( OPENVR_API_NODLL )
Expand Down Expand Up @@ -65,6 +65,16 @@
typedef uint64_t VRActionSetHandle_t;
typedef uint64_t VRInputValueHandle_t;
typedef uint64_t PathHandle_t;
// 64-bit types that are part of public structures
// that are replicated in shared memory.
#if defined(__linux__) || defined(__APPLE__)
typedef uint64_t vrshared_uint64_t __attribute__ ((aligned(8)));
typedef double vrshared_double __attribute__ ((aligned(8)));
#else
typedef uint64_t vrshared_uint64_t;
typedef double vrshared_double;
#endif
""")


Expand Down Expand Up @@ -157,7 +167,8 @@ def OutputStructFields(struct):
if(thetype[0:6] != 'union ' and thetype[0:7] != 'struct '):
thetypedef = getclasswithoutnamespace(typedef['typedef']) # remove the vr:: bit from thetypedef
thetype = getclasswithoutnamespace(thetype)
print('typedef '+thetype+' '+thetypedef+';')
if (thetypedef != 'vrshared_uint64_t' and thetypedef != 'vrshared_double'):
print('typedef '+thetype+' '+thetypedef+';')

######
# Output structs
Expand Down
200 changes: 118 additions & 82 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace vr
{
static const uint32_t k_nSteamVRVersionMajor = 1;
static const uint32_t k_nSteamVRVersionMinor = 23;
static const uint32_t k_nSteamVRVersionMinor = 26;
static const uint32_t k_nSteamVRVersionBuild = 7;
} // namespace vr

Expand Down Expand Up @@ -104,40 +104,6 @@ struct VRBoneTransform_t
HmdQuaternionf_t orientation;
};

#pragma pack( pop )

} // namespace vr

#endif

// vrtypes.h

#ifndef _INCLUDE_VRTYPES_H
#define _INCLUDE_VRTYPES_H

// Forward declarations to avoid requiring vulkan.h
struct VkDevice_T;
struct VkPhysicalDevice_T;
struct VkInstance_T;
struct VkQueue_T;

// Forward declarations to avoid requiring d3d12.h
struct ID3D12Resource;
struct ID3D12CommandQueue;

namespace vr
{
#pragma pack( push, 8 )

/** A handle for a spatial anchor. This handle is only valid during the session it was created in.
* Anchors that live beyond one session should be saved by their string descriptors. */
typedef uint32_t SpatialAnchorHandle_t;

typedef void* glSharedTextureHandle_t;
typedef int32_t glInt_t;
typedef uint32_t glUInt_t;


/** Used to return the post-distortion UVs for each color channel.
* UVs range from 0 to 1 with 0,0 in the upper left corner of the
* source render target. The 0,0 to 1,1 range covers a single eye. */
Expand All @@ -164,9 +130,9 @@ enum ETextureType
TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets.
// this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it
TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which
// are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right
// eye texture (vr::EVREye::Eye_Right)
TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which
// are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right
// eye texture (vr::EVREye::Eye_Right)
};

enum EColorSpace
Expand All @@ -183,6 +149,81 @@ struct Texture_t
EColorSpace eColorSpace;
};

/** Allows the application to control what part of the provided texture will be used in the
* frame buffer. */
struct VRTextureBounds_t
{
float uMin, vMin;
float uMax, vMax;
};

/** Allows specifying pose used to render provided scene texture (if different from value returned by WaitGetPoses). */
struct VRTextureWithPose_t : public Texture_t
{
HmdMatrix34_t mDeviceToAbsoluteTracking; // Actual pose used to render scene textures.
};

struct VRTextureDepthInfo_t
{
void* handle; // See ETextureType definition above
HmdMatrix44_t mProjection;
HmdVector2_t vRange; // 0..1
};

struct VRTextureWithDepth_t : public Texture_t
{
VRTextureDepthInfo_t depth;
};

struct VRTextureWithPoseAndDepth_t : public VRTextureWithPose_t
{
VRTextureDepthInfo_t depth;
};

// 64-bit types that are part of public structures
// that are replicated in shared memory.
#if defined(__linux__) || defined(__APPLE__)
typedef uint64_t vrshared_uint64_t __attribute__ ((aligned(8)));
typedef double vrshared_double __attribute__ ((aligned(8)));
#else
typedef uint64_t vrshared_uint64_t;
typedef double vrshared_double;
#endif

#pragma pack( pop )

} // namespace vr

#endif

// vrtypes.h

#ifndef _INCLUDE_VRTYPES_H
#define _INCLUDE_VRTYPES_H

// Forward declarations to avoid requiring vulkan.h
struct VkDevice_T;
struct VkPhysicalDevice_T;
struct VkInstance_T;
struct VkQueue_T;

// Forward declarations to avoid requiring d3d12.h
struct ID3D12Resource;
struct ID3D12CommandQueue;

namespace vr
{
#pragma pack( push, 8 )

/** A handle for a spatial anchor. This handle is only valid during the session it was created in.
* Anchors that live beyond one session should be saved by their string descriptors. */
typedef uint32_t SpatialAnchorHandle_t;

typedef void* glSharedTextureHandle_t;
typedef int32_t glInt_t;
typedef uint32_t glUInt_t;


// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource).
typedef uint64_t SharedTextureHandle_t;
#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0)
Expand Down Expand Up @@ -484,14 +525,22 @@ enum ETrackedDeviceProperty
// Prop_DashboardLayoutPathName_String = 2090, // DELETED
Prop_DashboardScale_Float = 2091,
Prop_PeerButtonInfo_String = 2092,
Prop_Hmd_SupportsHDR10_Bool = 2093,
Prop_Hmd_EnableParallelRenderCameras_Bool = 2094,
Prop_DriverProvidedChaperoneJson_String = 2095, // higher priority than Prop_DriverProvidedChaperonePath_String

Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
Prop_Hmd_SupportsDisplayPortTrainingMode_Bool = 2104,
Prop_SupportsRoomViewDirect_Bool = 2105,
Prop_SupportsAppThrottling_Bool = 2106,
Prop_Hmd_SupportsRoomViewDirect_Bool = 2105,
Prop_Hmd_SupportsAppThrottling_Bool = 2106,
Prop_Hmd_SupportsGpuBusMonitoring_Bool = 2107,

Prop_DSCVersion_Int32 = 2110,
Prop_DSCSliceCount_Int32 = 2111,
Prop_DSCBPPx16_Int32 = 2112,

// Driver requested mura correction properties
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
Expand Down Expand Up @@ -613,37 +662,6 @@ static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0;
static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0;


/** Allows the application to control what part of the provided texture will be used in the
* frame buffer. */
struct VRTextureBounds_t
{
float uMin, vMin;
float uMax, vMax;
};

/** Allows specifying pose used to render provided scene texture (if different from value returned by WaitGetPoses). */
struct VRTextureWithPose_t : public Texture_t
{
HmdMatrix34_t mDeviceToAbsoluteTracking; // Actual pose used to render scene textures.
};

struct VRTextureDepthInfo_t
{
void* handle; // See ETextureType definition above
HmdMatrix44_t mProjection;
HmdVector2_t vRange; // 0..1
};

struct VRTextureWithDepth_t : public Texture_t
{
VRTextureDepthInfo_t depth;
};

struct VRTextureWithPoseAndDepth_t : public VRTextureWithPose_t
{
VRTextureDepthInfo_t depth;
};

/** Allows the application to control how scene textures are used by the compositor when calling Submit. */
enum EVRSubmitFlags
{
Expand Down Expand Up @@ -783,7 +801,7 @@ enum EVREventType
// VREvent_SceneFocusLost = 402, // data is process
// VREvent_SceneFocusGained = 403, // data is process
VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor)
VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene
// VREvent_SceneFocusChanged = 405, // data is process - This is defunct and will not be called.
VREvent_InputFocusChanged = 406, // data is process
// VREvent_SceneApplicationSecondaryRenderingStarted = 407,
VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process
Expand All @@ -794,6 +812,8 @@ enum EVREventType

VREvent_SceneApplicationStateChanged = 412, // No data; but query VRApplications()->GetSceneApplicationState();

VREvent_SceneAppPipeDisconnected = 413, // data is process - Called when the scene app's pipe has been closed.

VREvent_ConsoleOpened = 420,
VREvent_ConsoleClosed = 421,

Expand Down Expand Up @@ -1007,6 +1027,9 @@ enum EVRButtonId
k_EButton_IndexController_B = k_EButton_ApplicationMenu,
k_EButton_IndexController_JoyStick = k_EButton_Axis3,

k_EButton_Reserved0 = 50,
k_EButton_Reserved1 = 51,

k_EButton_Max = 64
};

Expand Down Expand Up @@ -2801,7 +2824,6 @@ namespace vr
static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling";
static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode";
static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate";
Expand Down Expand Up @@ -2895,6 +2917,7 @@ namespace vr
static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
static const char * const k_pch_Perf_TestData_Float = "perfTestData";
static const char * const k_pch_Perf_GPUProfiling_Bool = "GPUProfiling";
static const char * const k_pch_Perf_GpuBusMonitoring_Bool = "gpuBusMonitoring";

//-----------------------------------------------------------------------------
// collision bounds keys
Expand Down Expand Up @@ -2967,6 +2990,7 @@ namespace vr
static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale";
static const char * const k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
static const char * const k_pch_Dashboard_StickyDashboard = "stickyDashboard";
static const char * const k_pch_Dashboard_AllowSteamOverlays_Bool = "allowSteamOverlays";

//-----------------------------------------------------------------------------
// model skin keys
Expand Down Expand Up @@ -2997,7 +3021,8 @@ namespace vr
// per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type
static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
static const char* const k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
static const char* const k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
static const char *const k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
static const char *const k_pch_App_BindingOpenXRAPISuffix_String = "_openxr";
static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
Expand Down Expand Up @@ -3278,6 +3303,16 @@ struct Compositor_CumulativeStats
uint32_t m_nNumFramePresentsTimedOut;
uint32_t m_nNumDroppedFramesTimedOut;
uint32_t m_nNumReprojectedFramesTimedOut;

/** For items in this section, divide all the values by m_nNumFrameSubmits. */
uint32_t m_nNumFrameSubmits;
vrshared_double m_flSumCompositorCPUTimeMS;
vrshared_double m_flSumCompositorGPUTimeMS;
vrshared_double m_flSumTargetFrameTimes;
vrshared_double m_flSumApplicationCPUTimeMS;
vrshared_double m_flSumApplicationGPUTimeMS;

uint32_t m_nNumFramesWithDepth; // total frames submitted with depth by the current application
};

struct Compositor_StageRenderSettings
Expand Down Expand Up @@ -3737,13 +3772,14 @@ namespace vr
VROverlayTransform_Invalid = -1,
VROverlayTransform_Absolute = 0,
VROverlayTransform_TrackedDeviceRelative = 1,
VROverlayTransform_SystemOverlay = 2,
//VROverlayTransform_SystemOverlay = 2, // Deleted from the SDK.
VROverlayTransform_TrackedComponent = 3,
VROverlayTransform_Cursor = 4,
VROverlayTransform_DashboardTab = 5,
VROverlayTransform_DashboardThumb = 6,
VROverlayTransform_Mountable = 7,
VROverlayTransform_Projection = 8,
VROverlayTransform_Subview = 9,
};

/** Overlay control settings */
Expand Down Expand Up @@ -3805,6 +3841,9 @@ namespace vr

// If this is set, the alpha values of the overlay texture will be ignored
VROverlayFlags_IgnoreTextureAlpha = 1 << 22,

// Do not use
VROverlayFlags_Reserved = 1 << 26,
};

enum VRMessageOverlayResponse
Expand Down Expand Up @@ -3981,6 +4020,9 @@ namespace vr
* Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same
* sort order are rendered back to front base on distance from the HMD.
*
* Subview overlays are always drawn immediately on top of their parent overlay, and the sort order is
* only relative to their peer subviews for that overlay.
*
* Sort order defaults to 0. */
virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0;

Expand Down Expand Up @@ -4041,12 +4083,6 @@ namespace vr
/** Gets the transform information when the overlay is rendering on a component. */
virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, VR_OUT_STRING() char *pchComponentName, uint32_t unComponentNameSize ) = 0;

/** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */
virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;

/** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */
virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;

/** Sets the hotspot for the specified overlay when that overlay is used as a cursor. These are in texture space with 0,0 in the upper left corner of
* the texture and 1,1 in the lower right corner of the texture. */
virtual EVROverlayError SetOverlayTransformCursor( VROverlayHandle_t ulCursorOverlayHandle, const HmdVector2_t *pvHotspot ) = 0;
Expand Down Expand Up @@ -4228,7 +4264,7 @@ namespace vr
virtual void CloseMessageOverlay() = 0;
};

static const char * const IVROverlay_Version = "IVROverlay_026";
static const char * const IVROverlay_Version = "IVROverlay_027";

} // namespace vr

Expand Down
Loading

0 comments on commit 751538d

Please sign in to comment.