diff --git a/third-party/openvr/bin/linux32/libopenvr_api.so b/third-party/openvr/bin/linux32/libopenvr_api.so index f0c2bef..c95dc19 100644 Binary files a/third-party/openvr/bin/linux32/libopenvr_api.so and b/third-party/openvr/bin/linux32/libopenvr_api.so differ diff --git a/third-party/openvr/bin/linux32/libopenvr_api.so.dbg b/third-party/openvr/bin/linux32/libopenvr_api.so.dbg index dc673e5..96f0d97 100644 Binary files a/third-party/openvr/bin/linux32/libopenvr_api.so.dbg and b/third-party/openvr/bin/linux32/libopenvr_api.so.dbg differ diff --git a/third-party/openvr/bin/linux64/libopenvr_api.so b/third-party/openvr/bin/linux64/libopenvr_api.so index b5db2f0..2575362 100644 Binary files a/third-party/openvr/bin/linux64/libopenvr_api.so and b/third-party/openvr/bin/linux64/libopenvr_api.so differ diff --git a/third-party/openvr/bin/linux64/libopenvr_api.so.dbg b/third-party/openvr/bin/linux64/libopenvr_api.so.dbg index e906635..2502ff0 100644 Binary files a/third-party/openvr/bin/linux64/libopenvr_api.so.dbg and b/third-party/openvr/bin/linux64/libopenvr_api.so.dbg differ diff --git a/third-party/openvr/bin/osx32/libopenvr_api.dylib b/third-party/openvr/bin/osx32/libopenvr_api.dylib index 8a2df47..059ac11 100644 Binary files a/third-party/openvr/bin/osx32/libopenvr_api.dylib and b/third-party/openvr/bin/osx32/libopenvr_api.dylib differ diff --git a/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib b/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib index 2351ff4..8c9a1d6 100644 Binary files a/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib and b/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib differ diff --git a/third-party/openvr/bin/win32/openvr_api.dll b/third-party/openvr/bin/win32/openvr_api.dll index 4f5bdf1..4b06e42 100644 Binary files a/third-party/openvr/bin/win32/openvr_api.dll and b/third-party/openvr/bin/win32/openvr_api.dll differ diff --git a/third-party/openvr/bin/win32/openvr_api.pdb b/third-party/openvr/bin/win32/openvr_api.pdb index f3429e0..81e9f1f 100644 Binary files a/third-party/openvr/bin/win32/openvr_api.pdb and b/third-party/openvr/bin/win32/openvr_api.pdb differ diff --git a/third-party/openvr/bin/win64/openvr_api.dll b/third-party/openvr/bin/win64/openvr_api.dll index 3b05986..114a983 100644 Binary files a/third-party/openvr/bin/win64/openvr_api.dll and b/third-party/openvr/bin/win64/openvr_api.dll differ diff --git a/third-party/openvr/bin/win64/openvr_api.pdb b/third-party/openvr/bin/win64/openvr_api.pdb index 3c53691..8996cc5 100644 Binary files a/third-party/openvr/bin/win64/openvr_api.pdb and b/third-party/openvr/bin/win64/openvr_api.pdb differ diff --git a/third-party/openvr/headers/openvr.h b/third-party/openvr/headers/openvr.h index 3585e25..c9e1f5d 100644 --- a/third-party/openvr/headers/openvr.h +++ b/third-party/openvr/headers/openvr.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 4; - static const uint32_t k_nSteamVRVersionBuild = 18; + static const uint32_t k_nSteamVRVersionMinor = 6; + static const uint32_t k_nSteamVRVersionBuild = 10; } // namespace vr // vrtypes.h @@ -354,6 +354,7 @@ enum ETrackedDeviceProperty Prop_BootloaderVersion_Uint64 = 1044, Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports + Prop_Firmware_RemindUpdate_Bool = 1047, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -408,7 +409,7 @@ enum ETrackedDeviceProperty Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded - Prop_DoNotApplyPrediction_Bool = 2054, + Prop_DoNotApplyPrediction_Bool = 2054, // currently no effect. was used to disable HMD pose prediction on MR, which is now done by MR driver setting velocity=0 Prop_CameraToHeadTransforms_Matrix34_Array = 2055, Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion Prop_DriverIsDrawingControllers_Bool = 2057, @@ -429,9 +430,14 @@ enum ETrackedDeviceProperty Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras) Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras) Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user + Prop_DisplayColorMultLeft_Vector3 = 2082, + Prop_DisplayColorMultRight_Vector3 = 2083, Prop_DashboardLayoutPathName_String = 2090, @@ -527,6 +533,15 @@ enum ETrackedPropertyError TrackedProp_IPCReadFailure = 13, }; +/** Used to drive certain text in the UI when talking about the tracking system for the HMD */ +enum EHmdTrackingStyle +{ + HmdTrackingStyle_Unknown = 0, + + HmdTrackingStyle_Lighthouse = 1, // base stations and lasers + HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style + HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world +}; typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; @@ -1110,6 +1125,7 @@ enum EShowUIType // ShowUI_QuickStart = 2, // Deprecated ShowUI_Pairing = 3, ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, }; struct VREvent_ShowUI_t @@ -1514,6 +1530,7 @@ enum EVRInitError VRInitError_Init_TrackerManagerInitFailed = 142, VRInitError_Init_AlreadyRunning = 143, VRInitError_Init_FailedForVrMonitor = 144, + VRInitError_Init_PropertyManagerInitFailed = 145, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1539,6 +1556,8 @@ enum EVRInitError VRInitError_IPC_CompositorConnectFailed = 306, VRInitError_IPC_CompositorInvalidConnectResponse = 307, VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + VRInitError_IPC_NamespaceUnavailable = 310, VRInitError_Compositor_Failed = 400, VRInitError_Compositor_D3D11HardwareRequired = 401, @@ -1625,6 +1644,8 @@ enum EVRInitError VRInitError_Compositor_CreateTextIndexBuffer = 482, VRInitError_Compositor_CreateMirrorTextures = 483, VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + VRInitError_Compositor_CreateMirrorOverlay = 485, + VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1642,6 +1663,7 @@ enum EVRInitError VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, VRInitError_Steam_SteamInstallationNotFound = 2000, @@ -1735,6 +1757,75 @@ typedef uint32_t ScreenshotHandle_t; static const uint32_t k_unScreenshotHandleInvalid = 0; +/** Compositor frame timing reprojection flags. */ +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame + +const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if + // it detects the application is taking too long to render. These two + // bits will contain the count of additional frames (normally zero). + // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from + // the latest frame timing entry. + +const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. + // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from + // the latest frame timing entry. + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; +}; + /** Frame timing data provided by direct mode drivers. */ struct DriverDirectMode_FrameTiming { @@ -2101,15 +2192,6 @@ public: * its own workload. One common way to do this is to reduce the size of the render target provided for each eye. */ virtual bool ShouldApplicationReduceRenderingWork() = 0; - // ------------------------------------ - // Debug Methods - // ------------------------------------ - - /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, - * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. - * The size of the response including its terminating null is returned. */ - virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; - // ------------------------------------ // Firmware methods // ------------------------------------ @@ -2134,9 +2216,29 @@ public: * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ virtual void AcknowledgeQuit_UserPrompt() = 0; + // ------------------------------------- + // App container sandbox methods + // ------------------------------------- + + /** Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application + * must have read access to when running inside of an app container. Returns the number of bytes + * needed to hold the list. */ + virtual uint32_t GetAppContainerFilePaths( VR_OUT_STRING() char *pchBuffer, uint32_t unBufferSize ) = 0; + + // ------------------------------------- + // System methods + // ------------------------------------- + + /** Returns the current version of the SteamVR runtime. The returned string will remain valid until VR_Shutdown is called. + * + * NOTE: Is it not appropriate to use this version to test for the presence of any SteamVR feature. Only use this version + * number for logging or showing to a user, and not to try to detect anything at runtime. When appropriate, feature-specific + * presence information is provided by other APIs. */ + virtual const char *GetRuntimeVersion() = 0; + }; -static const char * const IVRSystem_Version = "IVRSystem_019"; +static const char * const IVRSystem_Version = "IVRSystem_020"; } @@ -2506,7 +2608,7 @@ namespace vr static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; @@ -2534,13 +2636,15 @@ namespace vr static const char * const k_pch_SteamVR_DebugInput = "debugInput"; 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_InputBindingUIBlock = "inputBindingUI"; 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"; static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; //----------------------------------------------------------------------------- // direct mode keys @@ -2678,6 +2782,7 @@ namespace vr //----------------------------------------------------------------------------- // driver keys - These could be checked in any driver_ section static const char * const k_pch_Driver_Enable_Bool = "enable"; + static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; //----------------------------------------------------------------------------- // web interface keys @@ -2720,6 +2825,14 @@ namespace vr // Dismissed warnings static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + //----------------------------------------------------------------------------- + // Input Settings + static const char * const k_pch_Input_Section = "input"; + static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; + static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; + + } // namespace vr // ivrchaperone.h @@ -2922,74 +3035,6 @@ enum EVRCompositorTimingMode VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, }; -const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; -const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; -const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, - // but does not indicate if reprojection actually happened or not. - // Use the ReprojectionReason flags above to check if reprojection - // was actually applied (i.e. scene texture was reused). - // NumFramePresents > 1 also indicates the scene texture was reused, - // and also the number of times that it was presented in total. - -const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame - -const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if - // it detects the application is taking too long to render. These two - // bits will contain the count of additional frames (normally zero). - // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from - // the latest frame timing entry. - -const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. - // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from - // the latest frame timing entry. - -#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) -#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) - -/** Provides a single frame's timing information to the app */ -struct Compositor_FrameTiming -{ - uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) - uint32_t m_nFrameIndex; - uint32_t m_nNumFramePresents; // number of times this frame was presented - uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to - uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out - uint32_t m_nReprojectionFlags; - - /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ - double m_flSystemTimeInSeconds; - - /** These times may include work from other processes due to OS scheduling. - * The fewer packets of work these are broken up into, the less likely this will happen. - * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started - * processing that work earlier in the frame. */ - float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) - float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) - float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work - float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. - float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame - float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) - - /** Miscellaneous measured intervals. */ - float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses - float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) - float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) - float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) - - /** The following are all relative to this frame's SystemTimeInSeconds */ - float m_flWaitGetPosesCalledMs; - float m_flNewPosesReadyMs; - float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit - float m_flCompositorUpdateStartMs; - float m_flCompositorUpdateEndMs; - float m_flCompositorRenderStartMs; - - vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame - - uint32_t m_nNumVSyncsReadyForUse; - uint32_t m_nNumVSyncsToFirstView; -}; - /** Cumulative stats for current application. These are not cleared until a new app connects, * but they do stop accumulating once the associated app disconnects. */ struct Compositor_CumulativeStats @@ -3141,13 +3186,14 @@ public: /** Returns true if the current process has the scene focus */ virtual bool CanRenderScene() = 0; - /** Creates a window on the primary monitor to display what is being shown in the headset. */ + /** Opens the headset view (as either a window or docked widget depending on user's preferences) that displays what the user + * sees in the headset. */ virtual void ShowMirrorWindow() = 0; - /** Closes the mirror window. */ + /** Closes the headset view, either as a window or docked widget. */ virtual void HideMirrorWindow() = 0; - /** Returns true if the mirror window is shown. */ + /** Returns true if the headset view (either as a window or docked widget) is shown. */ virtual bool IsMirrorWindowVisible() = 0; /** Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root. */ @@ -3409,6 +3455,9 @@ namespace vr // If this is set the overlay will receive smooth VREvent_ScrollSmooth that emulate trackpad scrolling. // Requires mouse input mode. VROverlayFlags_SendVRSmoothScrollEvents = 17, + + // If this is set, the overlay texture will be protected content, preventing unauthorized reads. + VROverlayFlags_ProtectedContent = 18, }; enum VRMessageOverlayResponse @@ -4271,6 +4320,8 @@ public: virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; + + virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0; }; static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; @@ -4409,6 +4460,14 @@ namespace vr char rchRenderModelComponentName[128]; }; + struct InputBindingInfo_t + { + char rchDevicePathName[128]; + char rchInputPathName[128]; + char rchModeName[128]; + char rchSlotName[128]; + }; + struct VRActiveActionSet_t { /** This is the handle of the action set to activate for this frame. */ @@ -4543,6 +4602,9 @@ namespace vr /** Retrieves useful information for the origin of this action */ virtual EVRInputError GetOriginTrackedDeviceInfo( VRInputValueHandle_t origin, InputOriginInfo_t *pOriginInfo, uint32_t unOriginInfoSize ) = 0; + /** Retrieves useful information about the bindings for an action */ + virtual EVRInputError GetActionBindingInfo( VRActionHandle_t action, InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t *punReturnedBindingInfoCount ) = 0; + /** Shows the current binding for the action in-headset */ virtual EVRInputError ShowActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle ) = 0; @@ -4553,7 +4615,7 @@ namespace vr virtual bool IsUsingLegacyInput() = 0; }; - static const char * const IVRInput_Version = "IVRInput_006"; + static const char * const IVRInput_Version = "IVRInput_007"; } // namespace vr @@ -4660,6 +4722,49 @@ namespace vr static const char * const IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; +} // namespace vr + +// ivrdebug.h +namespace vr +{ + enum EVRDebugError + { + VRDebugError_Success = 0, + VRDebugError_BadParameter + }; + + /** Handle for vr profiler events */ + typedef uint64_t VrProfilerEventHandle_t; + + class IVRDebug + { + public: + + /** Create a vr profiler discrete event (point) + * The event will be associated with the message provided in pchMessage, and the current + * time will be used as the event timestamp. */ + virtual EVRDebugError EmitVrProfilerEvent( const char *pchMessage ) = 0; + + /** Create an vr profiler duration event (line) + * The current time will be used as the timestamp for the start of the line. + * On success, pHandleOut will contain a handle valid for terminating this event. */ + virtual EVRDebugError BeginVrProfilerEvent( VrProfilerEventHandle_t *pHandleOut ) = 0; + + /** Terminate a vr profiler event + * The event associated with hHandle will be considered completed when this method is called. + * The current time will be used assocaited to the termination time of the event, and + * pchMessage will be used as the event title. */ + virtual EVRDebugError FinishVrProfilerEvent( VrProfilerEventHandle_t hHandle, const char *pchMessage ) = 0; + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + }; + + static const char * const IVRDebug_Version = "IVRDebug_001"; + } // namespace vr // End @@ -4929,6 +5034,17 @@ namespace vr return m_pVRSpatialAnchors; } + IVRDebug *VRDebug() + { + CheckClear(); + if ( !m_pVRDebug ) + { + EVRInitError eError; + m_pVRDebug = (IVRDebug *)VR_GetGenericInterface( IVRDebug_Version, &eError ); + } + return m_pVRDebug; + } + IVRNotifications *VRNotifications() { CheckClear(); @@ -4957,6 +5073,7 @@ namespace vr IVRInput *m_pVRInput; IVRIOBuffer *m_pVRIOBuffer; IVRSpatialAnchors *m_pVRSpatialAnchors; + IVRDebug *m_pVRDebug; IVRNotifications *m_pVRNotifications; }; @@ -4983,6 +5100,7 @@ namespace vr inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleContext().VRIOBuffer(); } inline IVRSpatialAnchors *VR_CALLTYPE VRSpatialAnchors() { return OpenVRInternal_ModuleContext().VRSpatialAnchors(); } inline IVRNotifications *VR_CALLTYPE VRNotifications() { return OpenVRInternal_ModuleContext().VRNotifications(); } + inline IVRDebug *VR_CALLTYPE VRDebug() { return OpenVRInternal_ModuleContext().VRDebug(); } inline void COpenVRContext::Clear() { @@ -5003,6 +5121,7 @@ namespace vr m_pVRIOBuffer = nullptr; m_pVRSpatialAnchors = nullptr; m_pVRNotifications = nullptr; + m_pVRDebug = nullptr; } VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); diff --git a/third-party/openvr/headers/openvr_api.cs b/third-party/openvr/headers/openvr_api.cs index d593777..f96ad80 100644 --- a/third-party/openvr/headers/openvr_api.cs +++ b/third-party/openvr/headers/openvr_api.cs @@ -230,11 +230,6 @@ public struct IVRSystem [MarshalAs(UnmanagedType.FunctionPtr)] internal _ShouldApplicationReduceRenderingWork ShouldApplicationReduceRenderingWork; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate uint _DriverDebugRequest(uint unDeviceIndex, string pchRequest, System.Text.StringBuilder pchResponseBuffer, uint unResponseBufferSize); - [MarshalAs(UnmanagedType.FunctionPtr)] - internal _DriverDebugRequest DriverDebugRequest; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRFirmwareError _PerformFirmwareUpdate(uint unDeviceIndex); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -250,6 +245,16 @@ public struct IVRSystem [MarshalAs(UnmanagedType.FunctionPtr)] internal _AcknowledgeQuit_UserPrompt AcknowledgeQuit_UserPrompt; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate uint _GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer, uint unBufferSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetAppContainerFilePaths GetAppContainerFilePaths; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate IntPtr _GetRuntimeVersion(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetRuntimeVersion GetRuntimeVersion; + } [StructLayout(LayoutKind.Sequential)] @@ -1550,6 +1555,11 @@ public struct IVRDriverManager [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetDriverHandle GetDriverHandle; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _IsEnabled(uint nDriver); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _IsEnabled IsEnabled; + } [StructLayout(LayoutKind.Sequential)] @@ -1670,6 +1680,11 @@ public struct IVRInput [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetOriginTrackedDeviceInfo GetOriginTrackedDeviceInfo; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetActionBindingInfo(ulong action, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref uint punReturnedBindingInfoCount); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetActionBindingInfo GetActionBindingInfo; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRInputError _ShowActionOrigins(ulong actionSetHandle, ulong ulActionHandle); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1747,6 +1762,31 @@ public struct IVRSpatialAnchors } +[StructLayout(LayoutKind.Sequential)] +public struct IVRDebug +{ + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRDebugError _EmitVrProfilerEvent(string pchMessage); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _EmitVrProfilerEvent EmitVrProfilerEvent; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRDebugError _BeginVrProfilerEvent(ref ulong pHandleOut); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _BeginVrProfilerEvent BeginVrProfilerEvent; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRDebugError _FinishVrProfilerEvent(ulong hHandle, string pchMessage); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _FinishVrProfilerEvent FinishVrProfilerEvent; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate uint _DriverDebugRequest(uint unDeviceIndex, string pchRequest, System.Text.StringBuilder pchResponseBuffer, uint unResponseBufferSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _DriverDebugRequest DriverDebugRequest; + +} + public class CVRSystem { @@ -2050,11 +2090,6 @@ public class CVRSystem bool result = FnTable.ShouldApplicationReduceRenderingWork(); return result; } - public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,System.Text.StringBuilder pchResponseBuffer,uint unResponseBufferSize) - { - uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize); - return result; - } public EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex) { EVRFirmwareError result = FnTable.PerformFirmwareUpdate(unDeviceIndex); @@ -2068,6 +2103,16 @@ public class CVRSystem { FnTable.AcknowledgeQuit_UserPrompt(); } + public uint GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer,uint unBufferSize) + { + uint result = FnTable.GetAppContainerFilePaths(pchBuffer,unBufferSize); + return result; + } + public string GetRuntimeVersion() + { + IntPtr result = FnTable.GetRuntimeVersion(); + return Marshal.PtrToStringAnsi(result); + } } @@ -3493,6 +3538,11 @@ public class CVRDriverManager ulong result = FnTable.GetDriverHandle(pchDriverName); return result; } + public bool IsEnabled(uint nDriver) + { + bool result = FnTable.IsEnabled(nDriver); + return result; + } } @@ -3623,6 +3673,12 @@ public class CVRInput EVRInputError result = FnTable.GetOriginTrackedDeviceInfo(origin,ref pOriginInfo,unOriginInfoSize); return result; } + public EVRInputError GetActionBindingInfo(ulong action,ref InputBindingInfo_t pOriginInfo,uint unBindingInfoSize,uint unBindingInfoCount,ref uint punReturnedBindingInfoCount) + { + punReturnedBindingInfoCount = 0; + EVRInputError result = FnTable.GetActionBindingInfo(action,ref pOriginInfo,unBindingInfoSize,unBindingInfoCount,ref punReturnedBindingInfoCount); + return result; + } public EVRInputError ShowActionOrigins(ulong actionSetHandle,ulong ulActionHandle) { EVRInputError result = FnTable.ShowActionOrigins(actionSetHandle,ulActionHandle); @@ -3716,6 +3772,37 @@ public class CVRSpatialAnchors } +public class CVRDebug +{ + IVRDebug FnTable; + internal CVRDebug(IntPtr pInterface) + { + FnTable = (IVRDebug)Marshal.PtrToStructure(pInterface, typeof(IVRDebug)); + } + public EVRDebugError EmitVrProfilerEvent(string pchMessage) + { + EVRDebugError result = FnTable.EmitVrProfilerEvent(pchMessage); + return result; + } + public EVRDebugError BeginVrProfilerEvent(ref ulong pHandleOut) + { + pHandleOut = 0; + EVRDebugError result = FnTable.BeginVrProfilerEvent(ref pHandleOut); + return result; + } + public EVRDebugError FinishVrProfilerEvent(ulong hHandle,string pchMessage) + { + EVRDebugError result = FnTable.FinishVrProfilerEvent(hHandle,pchMessage); + return result; + } + public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,System.Text.StringBuilder pchResponseBuffer,uint unResponseBufferSize) + { + uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize); + return result; + } +} + + public class OpenVRInterop { [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)] @@ -3854,6 +3941,7 @@ public enum ETrackedDeviceProperty Prop_BootloaderVersion_Uint64 = 1044, Prop_AdditionalSystemReportData_String = 1045, Prop_CompositeFirmwareVersion_String = 1046, + Prop_Firmware_RemindUpdate_Bool = 1047, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -3926,8 +4014,12 @@ public enum ETrackedDeviceProperty Prop_CameraDistortionFunction_Int32_Array = 2072, Prop_CameraDistortionCoefficients_Float_Array = 2073, Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, Prop_DisplayAvailableFrameRates_Float_Array = 2080, Prop_DisplaySupportsMultipleFramerates_Bool = 2081, + Prop_DisplayColorMultLeft_Vector3 = 2082, + Prop_DisplayColorMultRight_Vector3 = 2083, Prop_DashboardLayoutPathName_String = 2090, Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, @@ -3998,6 +4090,13 @@ public enum ETrackedPropertyError TrackedProp_CannotWriteToWildcards = 12, TrackedProp_IPCReadFailure = 13, } +public enum EHmdTrackingStyle +{ + Unknown = 0, + Lighthouse = 1, + OutsideInCameras = 2, + InsideOutCameras = 3, +} public enum EVRSubmitFlags { Submit_Default = 0, @@ -4238,6 +4337,7 @@ public enum EShowUIType ShowUI_ManageTrackers = 1, ShowUI_Pairing = 3, ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, } public enum EHDCPError { @@ -4429,6 +4529,7 @@ public enum EVRInitError Init_TrackerManagerInitFailed = 142, Init_AlreadyRunning = 143, Init_FailedForVrMonitor = 144, + Init_PropertyManagerInitFailed = 145, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -4451,6 +4552,8 @@ public enum EVRInitError IPC_CompositorConnectFailed = 306, IPC_CompositorInvalidConnectResponse = 307, IPC_ConnectFailedAfterMultipleAttempts = 308, + IPC_ConnectFailedAfterTargetExited = 309, + IPC_NamespaceUnavailable = 310, Compositor_Failed = 400, Compositor_D3D11HardwareRequired = 401, Compositor_FirmwareRequiresUpdate = 402, @@ -4536,6 +4639,8 @@ public enum EVRInitError Compositor_CreateTextIndexBuffer = 482, Compositor_CreateMirrorTextures = 483, Compositor_CreateLastFrameRenderTexture = 484, + Compositor_CreateMirrorOverlay = 485, + Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, VendorSpecific_UnableToConnectToOculusRuntime = 1000, VendorSpecific_WindowsNotInDevMode = 1001, VendorSpecific_HmdFound_CantOpenDevice = 1101, @@ -4551,6 +4656,7 @@ public enum EVRInitError VendorSpecific_HmdFound_UserDataAddressRange = 1111, VendorSpecific_HmdFound_UserDataError = 1112, VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VendorSpecific_OculusRuntimeBadInstall = 1114, Steam_SteamInstallationNotFound = 2000, LastError = 2001, } @@ -4756,6 +4862,7 @@ public enum VROverlayFlags VisibleInDashboard = 15, MakeOverlaysInteractiveIfVisible = 16, SendVRSmoothScrollEvents = 17, + ProtectedContent = 18, } public enum VRMessageOverlayResponse { @@ -4909,6 +5016,11 @@ public enum EIOBufferMode Write = 2, Create = 512, } +public enum EVRDebugError +{ + Success = 0, + BadParameter = 1, +} [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t { @@ -5427,26 +5539,6 @@ public enum EIOBufferMode public TrackedDevicePose_t standingTrackedDevicePose; public ulong ulFrameExposureTime; } -[StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming -{ - public uint m_nSize; - public uint m_nNumFramePresents; - public uint m_nNumMisPresented; - public uint m_nNumDroppedFrames; - public uint m_nReprojectionFlags; -} -[StructLayout(LayoutKind.Sequential)] public struct ImuSample_t -{ - public double fSampleTime; - public HmdVector3d_t vAccel; - public HmdVector3d_t vGyro; - public uint unOffScaleFlags; -} -[StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t -{ - public IntPtr pchKey; // const char * - public IntPtr pchValue; // const char * -} [StructLayout(LayoutKind.Sequential)] public struct Compositor_FrameTiming { public uint m_nSize; @@ -5476,6 +5568,26 @@ public enum EIOBufferMode public uint m_nNumVSyncsReadyForUse; public uint m_nNumVSyncsToFirstView; } +[StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming +{ + public uint m_nSize; + public uint m_nNumFramePresents; + public uint m_nNumMisPresented; + public uint m_nNumDroppedFrames; + public uint m_nReprojectionFlags; +} +[StructLayout(LayoutKind.Sequential)] public struct ImuSample_t +{ + public double fSampleTime; + public HmdVector3d_t vAccel; + public HmdVector3d_t vGyro; + public uint unOffScaleFlags; +} +[StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t +{ + public IntPtr pchKey; // const char * + public IntPtr pchValue; // const char * +} [StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats { public uint m_nPid; @@ -5791,6 +5903,557 @@ public enum EIOBufferMode } } } +[StructLayout(LayoutKind.Sequential)] public struct InputBindingInfo_t +{ + public byte rchDevicePathName0,rchDevicePathName1,rchDevicePathName2,rchDevicePathName3,rchDevicePathName4,rchDevicePathName5,rchDevicePathName6,rchDevicePathName7,rchDevicePathName8,rchDevicePathName9,rchDevicePathName10,rchDevicePathName11,rchDevicePathName12,rchDevicePathName13,rchDevicePathName14,rchDevicePathName15,rchDevicePathName16,rchDevicePathName17,rchDevicePathName18,rchDevicePathName19,rchDevicePathName20,rchDevicePathName21,rchDevicePathName22,rchDevicePathName23,rchDevicePathName24,rchDevicePathName25,rchDevicePathName26,rchDevicePathName27,rchDevicePathName28,rchDevicePathName29,rchDevicePathName30,rchDevicePathName31,rchDevicePathName32,rchDevicePathName33,rchDevicePathName34,rchDevicePathName35,rchDevicePathName36,rchDevicePathName37,rchDevicePathName38,rchDevicePathName39,rchDevicePathName40,rchDevicePathName41,rchDevicePathName42,rchDevicePathName43,rchDevicePathName44,rchDevicePathName45,rchDevicePathName46,rchDevicePathName47,rchDevicePathName48,rchDevicePathName49,rchDevicePathName50,rchDevicePathName51,rchDevicePathName52,rchDevicePathName53,rchDevicePathName54,rchDevicePathName55,rchDevicePathName56,rchDevicePathName57,rchDevicePathName58,rchDevicePathName59,rchDevicePathName60,rchDevicePathName61,rchDevicePathName62,rchDevicePathName63,rchDevicePathName64,rchDevicePathName65,rchDevicePathName66,rchDevicePathName67,rchDevicePathName68,rchDevicePathName69,rchDevicePathName70,rchDevicePathName71,rchDevicePathName72,rchDevicePathName73,rchDevicePathName74,rchDevicePathName75,rchDevicePathName76,rchDevicePathName77,rchDevicePathName78,rchDevicePathName79,rchDevicePathName80,rchDevicePathName81,rchDevicePathName82,rchDevicePathName83,rchDevicePathName84,rchDevicePathName85,rchDevicePathName86,rchDevicePathName87,rchDevicePathName88,rchDevicePathName89,rchDevicePathName90,rchDevicePathName91,rchDevicePathName92,rchDevicePathName93,rchDevicePathName94,rchDevicePathName95,rchDevicePathName96,rchDevicePathName97,rchDevicePathName98,rchDevicePathName99,rchDevicePathName100,rchDevicePathName101,rchDevicePathName102,rchDevicePathName103,rchDevicePathName104,rchDevicePathName105,rchDevicePathName106,rchDevicePathName107,rchDevicePathName108,rchDevicePathName109,rchDevicePathName110,rchDevicePathName111,rchDevicePathName112,rchDevicePathName113,rchDevicePathName114,rchDevicePathName115,rchDevicePathName116,rchDevicePathName117,rchDevicePathName118,rchDevicePathName119,rchDevicePathName120,rchDevicePathName121,rchDevicePathName122,rchDevicePathName123,rchDevicePathName124,rchDevicePathName125,rchDevicePathName126,rchDevicePathName127; + public string rchDevicePathName + { + get + { + return new string(new char[] { + (char)rchDevicePathName0, + (char)rchDevicePathName1, + (char)rchDevicePathName2, + (char)rchDevicePathName3, + (char)rchDevicePathName4, + (char)rchDevicePathName5, + (char)rchDevicePathName6, + (char)rchDevicePathName7, + (char)rchDevicePathName8, + (char)rchDevicePathName9, + (char)rchDevicePathName10, + (char)rchDevicePathName11, + (char)rchDevicePathName12, + (char)rchDevicePathName13, + (char)rchDevicePathName14, + (char)rchDevicePathName15, + (char)rchDevicePathName16, + (char)rchDevicePathName17, + (char)rchDevicePathName18, + (char)rchDevicePathName19, + (char)rchDevicePathName20, + (char)rchDevicePathName21, + (char)rchDevicePathName22, + (char)rchDevicePathName23, + (char)rchDevicePathName24, + (char)rchDevicePathName25, + (char)rchDevicePathName26, + (char)rchDevicePathName27, + (char)rchDevicePathName28, + (char)rchDevicePathName29, + (char)rchDevicePathName30, + (char)rchDevicePathName31, + (char)rchDevicePathName32, + (char)rchDevicePathName33, + (char)rchDevicePathName34, + (char)rchDevicePathName35, + (char)rchDevicePathName36, + (char)rchDevicePathName37, + (char)rchDevicePathName38, + (char)rchDevicePathName39, + (char)rchDevicePathName40, + (char)rchDevicePathName41, + (char)rchDevicePathName42, + (char)rchDevicePathName43, + (char)rchDevicePathName44, + (char)rchDevicePathName45, + (char)rchDevicePathName46, + (char)rchDevicePathName47, + (char)rchDevicePathName48, + (char)rchDevicePathName49, + (char)rchDevicePathName50, + (char)rchDevicePathName51, + (char)rchDevicePathName52, + (char)rchDevicePathName53, + (char)rchDevicePathName54, + (char)rchDevicePathName55, + (char)rchDevicePathName56, + (char)rchDevicePathName57, + (char)rchDevicePathName58, + (char)rchDevicePathName59, + (char)rchDevicePathName60, + (char)rchDevicePathName61, + (char)rchDevicePathName62, + (char)rchDevicePathName63, + (char)rchDevicePathName64, + (char)rchDevicePathName65, + (char)rchDevicePathName66, + (char)rchDevicePathName67, + (char)rchDevicePathName68, + (char)rchDevicePathName69, + (char)rchDevicePathName70, + (char)rchDevicePathName71, + (char)rchDevicePathName72, + (char)rchDevicePathName73, + (char)rchDevicePathName74, + (char)rchDevicePathName75, + (char)rchDevicePathName76, + (char)rchDevicePathName77, + (char)rchDevicePathName78, + (char)rchDevicePathName79, + (char)rchDevicePathName80, + (char)rchDevicePathName81, + (char)rchDevicePathName82, + (char)rchDevicePathName83, + (char)rchDevicePathName84, + (char)rchDevicePathName85, + (char)rchDevicePathName86, + (char)rchDevicePathName87, + (char)rchDevicePathName88, + (char)rchDevicePathName89, + (char)rchDevicePathName90, + (char)rchDevicePathName91, + (char)rchDevicePathName92, + (char)rchDevicePathName93, + (char)rchDevicePathName94, + (char)rchDevicePathName95, + (char)rchDevicePathName96, + (char)rchDevicePathName97, + (char)rchDevicePathName98, + (char)rchDevicePathName99, + (char)rchDevicePathName100, + (char)rchDevicePathName101, + (char)rchDevicePathName102, + (char)rchDevicePathName103, + (char)rchDevicePathName104, + (char)rchDevicePathName105, + (char)rchDevicePathName106, + (char)rchDevicePathName107, + (char)rchDevicePathName108, + (char)rchDevicePathName109, + (char)rchDevicePathName110, + (char)rchDevicePathName111, + (char)rchDevicePathName112, + (char)rchDevicePathName113, + (char)rchDevicePathName114, + (char)rchDevicePathName115, + (char)rchDevicePathName116, + (char)rchDevicePathName117, + (char)rchDevicePathName118, + (char)rchDevicePathName119, + (char)rchDevicePathName120, + (char)rchDevicePathName121, + (char)rchDevicePathName122, + (char)rchDevicePathName123, + (char)rchDevicePathName124, + (char)rchDevicePathName125, + (char)rchDevicePathName126, + (char)rchDevicePathName127 + }).TrimEnd('\0'); + } + } + public byte rchInputPathName0,rchInputPathName1,rchInputPathName2,rchInputPathName3,rchInputPathName4,rchInputPathName5,rchInputPathName6,rchInputPathName7,rchInputPathName8,rchInputPathName9,rchInputPathName10,rchInputPathName11,rchInputPathName12,rchInputPathName13,rchInputPathName14,rchInputPathName15,rchInputPathName16,rchInputPathName17,rchInputPathName18,rchInputPathName19,rchInputPathName20,rchInputPathName21,rchInputPathName22,rchInputPathName23,rchInputPathName24,rchInputPathName25,rchInputPathName26,rchInputPathName27,rchInputPathName28,rchInputPathName29,rchInputPathName30,rchInputPathName31,rchInputPathName32,rchInputPathName33,rchInputPathName34,rchInputPathName35,rchInputPathName36,rchInputPathName37,rchInputPathName38,rchInputPathName39,rchInputPathName40,rchInputPathName41,rchInputPathName42,rchInputPathName43,rchInputPathName44,rchInputPathName45,rchInputPathName46,rchInputPathName47,rchInputPathName48,rchInputPathName49,rchInputPathName50,rchInputPathName51,rchInputPathName52,rchInputPathName53,rchInputPathName54,rchInputPathName55,rchInputPathName56,rchInputPathName57,rchInputPathName58,rchInputPathName59,rchInputPathName60,rchInputPathName61,rchInputPathName62,rchInputPathName63,rchInputPathName64,rchInputPathName65,rchInputPathName66,rchInputPathName67,rchInputPathName68,rchInputPathName69,rchInputPathName70,rchInputPathName71,rchInputPathName72,rchInputPathName73,rchInputPathName74,rchInputPathName75,rchInputPathName76,rchInputPathName77,rchInputPathName78,rchInputPathName79,rchInputPathName80,rchInputPathName81,rchInputPathName82,rchInputPathName83,rchInputPathName84,rchInputPathName85,rchInputPathName86,rchInputPathName87,rchInputPathName88,rchInputPathName89,rchInputPathName90,rchInputPathName91,rchInputPathName92,rchInputPathName93,rchInputPathName94,rchInputPathName95,rchInputPathName96,rchInputPathName97,rchInputPathName98,rchInputPathName99,rchInputPathName100,rchInputPathName101,rchInputPathName102,rchInputPathName103,rchInputPathName104,rchInputPathName105,rchInputPathName106,rchInputPathName107,rchInputPathName108,rchInputPathName109,rchInputPathName110,rchInputPathName111,rchInputPathName112,rchInputPathName113,rchInputPathName114,rchInputPathName115,rchInputPathName116,rchInputPathName117,rchInputPathName118,rchInputPathName119,rchInputPathName120,rchInputPathName121,rchInputPathName122,rchInputPathName123,rchInputPathName124,rchInputPathName125,rchInputPathName126,rchInputPathName127; + public string rchInputPathName + { + get + { + return new string(new char[] { + (char)rchInputPathName0, + (char)rchInputPathName1, + (char)rchInputPathName2, + (char)rchInputPathName3, + (char)rchInputPathName4, + (char)rchInputPathName5, + (char)rchInputPathName6, + (char)rchInputPathName7, + (char)rchInputPathName8, + (char)rchInputPathName9, + (char)rchInputPathName10, + (char)rchInputPathName11, + (char)rchInputPathName12, + (char)rchInputPathName13, + (char)rchInputPathName14, + (char)rchInputPathName15, + (char)rchInputPathName16, + (char)rchInputPathName17, + (char)rchInputPathName18, + (char)rchInputPathName19, + (char)rchInputPathName20, + (char)rchInputPathName21, + (char)rchInputPathName22, + (char)rchInputPathName23, + (char)rchInputPathName24, + (char)rchInputPathName25, + (char)rchInputPathName26, + (char)rchInputPathName27, + (char)rchInputPathName28, + (char)rchInputPathName29, + (char)rchInputPathName30, + (char)rchInputPathName31, + (char)rchInputPathName32, + (char)rchInputPathName33, + (char)rchInputPathName34, + (char)rchInputPathName35, + (char)rchInputPathName36, + (char)rchInputPathName37, + (char)rchInputPathName38, + (char)rchInputPathName39, + (char)rchInputPathName40, + (char)rchInputPathName41, + (char)rchInputPathName42, + (char)rchInputPathName43, + (char)rchInputPathName44, + (char)rchInputPathName45, + (char)rchInputPathName46, + (char)rchInputPathName47, + (char)rchInputPathName48, + (char)rchInputPathName49, + (char)rchInputPathName50, + (char)rchInputPathName51, + (char)rchInputPathName52, + (char)rchInputPathName53, + (char)rchInputPathName54, + (char)rchInputPathName55, + (char)rchInputPathName56, + (char)rchInputPathName57, + (char)rchInputPathName58, + (char)rchInputPathName59, + (char)rchInputPathName60, + (char)rchInputPathName61, + (char)rchInputPathName62, + (char)rchInputPathName63, + (char)rchInputPathName64, + (char)rchInputPathName65, + (char)rchInputPathName66, + (char)rchInputPathName67, + (char)rchInputPathName68, + (char)rchInputPathName69, + (char)rchInputPathName70, + (char)rchInputPathName71, + (char)rchInputPathName72, + (char)rchInputPathName73, + (char)rchInputPathName74, + (char)rchInputPathName75, + (char)rchInputPathName76, + (char)rchInputPathName77, + (char)rchInputPathName78, + (char)rchInputPathName79, + (char)rchInputPathName80, + (char)rchInputPathName81, + (char)rchInputPathName82, + (char)rchInputPathName83, + (char)rchInputPathName84, + (char)rchInputPathName85, + (char)rchInputPathName86, + (char)rchInputPathName87, + (char)rchInputPathName88, + (char)rchInputPathName89, + (char)rchInputPathName90, + (char)rchInputPathName91, + (char)rchInputPathName92, + (char)rchInputPathName93, + (char)rchInputPathName94, + (char)rchInputPathName95, + (char)rchInputPathName96, + (char)rchInputPathName97, + (char)rchInputPathName98, + (char)rchInputPathName99, + (char)rchInputPathName100, + (char)rchInputPathName101, + (char)rchInputPathName102, + (char)rchInputPathName103, + (char)rchInputPathName104, + (char)rchInputPathName105, + (char)rchInputPathName106, + (char)rchInputPathName107, + (char)rchInputPathName108, + (char)rchInputPathName109, + (char)rchInputPathName110, + (char)rchInputPathName111, + (char)rchInputPathName112, + (char)rchInputPathName113, + (char)rchInputPathName114, + (char)rchInputPathName115, + (char)rchInputPathName116, + (char)rchInputPathName117, + (char)rchInputPathName118, + (char)rchInputPathName119, + (char)rchInputPathName120, + (char)rchInputPathName121, + (char)rchInputPathName122, + (char)rchInputPathName123, + (char)rchInputPathName124, + (char)rchInputPathName125, + (char)rchInputPathName126, + (char)rchInputPathName127 + }).TrimEnd('\0'); + } + } + public byte rchModeName0,rchModeName1,rchModeName2,rchModeName3,rchModeName4,rchModeName5,rchModeName6,rchModeName7,rchModeName8,rchModeName9,rchModeName10,rchModeName11,rchModeName12,rchModeName13,rchModeName14,rchModeName15,rchModeName16,rchModeName17,rchModeName18,rchModeName19,rchModeName20,rchModeName21,rchModeName22,rchModeName23,rchModeName24,rchModeName25,rchModeName26,rchModeName27,rchModeName28,rchModeName29,rchModeName30,rchModeName31,rchModeName32,rchModeName33,rchModeName34,rchModeName35,rchModeName36,rchModeName37,rchModeName38,rchModeName39,rchModeName40,rchModeName41,rchModeName42,rchModeName43,rchModeName44,rchModeName45,rchModeName46,rchModeName47,rchModeName48,rchModeName49,rchModeName50,rchModeName51,rchModeName52,rchModeName53,rchModeName54,rchModeName55,rchModeName56,rchModeName57,rchModeName58,rchModeName59,rchModeName60,rchModeName61,rchModeName62,rchModeName63,rchModeName64,rchModeName65,rchModeName66,rchModeName67,rchModeName68,rchModeName69,rchModeName70,rchModeName71,rchModeName72,rchModeName73,rchModeName74,rchModeName75,rchModeName76,rchModeName77,rchModeName78,rchModeName79,rchModeName80,rchModeName81,rchModeName82,rchModeName83,rchModeName84,rchModeName85,rchModeName86,rchModeName87,rchModeName88,rchModeName89,rchModeName90,rchModeName91,rchModeName92,rchModeName93,rchModeName94,rchModeName95,rchModeName96,rchModeName97,rchModeName98,rchModeName99,rchModeName100,rchModeName101,rchModeName102,rchModeName103,rchModeName104,rchModeName105,rchModeName106,rchModeName107,rchModeName108,rchModeName109,rchModeName110,rchModeName111,rchModeName112,rchModeName113,rchModeName114,rchModeName115,rchModeName116,rchModeName117,rchModeName118,rchModeName119,rchModeName120,rchModeName121,rchModeName122,rchModeName123,rchModeName124,rchModeName125,rchModeName126,rchModeName127; + public string rchModeName + { + get + { + return new string(new char[] { + (char)rchModeName0, + (char)rchModeName1, + (char)rchModeName2, + (char)rchModeName3, + (char)rchModeName4, + (char)rchModeName5, + (char)rchModeName6, + (char)rchModeName7, + (char)rchModeName8, + (char)rchModeName9, + (char)rchModeName10, + (char)rchModeName11, + (char)rchModeName12, + (char)rchModeName13, + (char)rchModeName14, + (char)rchModeName15, + (char)rchModeName16, + (char)rchModeName17, + (char)rchModeName18, + (char)rchModeName19, + (char)rchModeName20, + (char)rchModeName21, + (char)rchModeName22, + (char)rchModeName23, + (char)rchModeName24, + (char)rchModeName25, + (char)rchModeName26, + (char)rchModeName27, + (char)rchModeName28, + (char)rchModeName29, + (char)rchModeName30, + (char)rchModeName31, + (char)rchModeName32, + (char)rchModeName33, + (char)rchModeName34, + (char)rchModeName35, + (char)rchModeName36, + (char)rchModeName37, + (char)rchModeName38, + (char)rchModeName39, + (char)rchModeName40, + (char)rchModeName41, + (char)rchModeName42, + (char)rchModeName43, + (char)rchModeName44, + (char)rchModeName45, + (char)rchModeName46, + (char)rchModeName47, + (char)rchModeName48, + (char)rchModeName49, + (char)rchModeName50, + (char)rchModeName51, + (char)rchModeName52, + (char)rchModeName53, + (char)rchModeName54, + (char)rchModeName55, + (char)rchModeName56, + (char)rchModeName57, + (char)rchModeName58, + (char)rchModeName59, + (char)rchModeName60, + (char)rchModeName61, + (char)rchModeName62, + (char)rchModeName63, + (char)rchModeName64, + (char)rchModeName65, + (char)rchModeName66, + (char)rchModeName67, + (char)rchModeName68, + (char)rchModeName69, + (char)rchModeName70, + (char)rchModeName71, + (char)rchModeName72, + (char)rchModeName73, + (char)rchModeName74, + (char)rchModeName75, + (char)rchModeName76, + (char)rchModeName77, + (char)rchModeName78, + (char)rchModeName79, + (char)rchModeName80, + (char)rchModeName81, + (char)rchModeName82, + (char)rchModeName83, + (char)rchModeName84, + (char)rchModeName85, + (char)rchModeName86, + (char)rchModeName87, + (char)rchModeName88, + (char)rchModeName89, + (char)rchModeName90, + (char)rchModeName91, + (char)rchModeName92, + (char)rchModeName93, + (char)rchModeName94, + (char)rchModeName95, + (char)rchModeName96, + (char)rchModeName97, + (char)rchModeName98, + (char)rchModeName99, + (char)rchModeName100, + (char)rchModeName101, + (char)rchModeName102, + (char)rchModeName103, + (char)rchModeName104, + (char)rchModeName105, + (char)rchModeName106, + (char)rchModeName107, + (char)rchModeName108, + (char)rchModeName109, + (char)rchModeName110, + (char)rchModeName111, + (char)rchModeName112, + (char)rchModeName113, + (char)rchModeName114, + (char)rchModeName115, + (char)rchModeName116, + (char)rchModeName117, + (char)rchModeName118, + (char)rchModeName119, + (char)rchModeName120, + (char)rchModeName121, + (char)rchModeName122, + (char)rchModeName123, + (char)rchModeName124, + (char)rchModeName125, + (char)rchModeName126, + (char)rchModeName127 + }).TrimEnd('\0'); + } + } + public byte rchSlotName0,rchSlotName1,rchSlotName2,rchSlotName3,rchSlotName4,rchSlotName5,rchSlotName6,rchSlotName7,rchSlotName8,rchSlotName9,rchSlotName10,rchSlotName11,rchSlotName12,rchSlotName13,rchSlotName14,rchSlotName15,rchSlotName16,rchSlotName17,rchSlotName18,rchSlotName19,rchSlotName20,rchSlotName21,rchSlotName22,rchSlotName23,rchSlotName24,rchSlotName25,rchSlotName26,rchSlotName27,rchSlotName28,rchSlotName29,rchSlotName30,rchSlotName31,rchSlotName32,rchSlotName33,rchSlotName34,rchSlotName35,rchSlotName36,rchSlotName37,rchSlotName38,rchSlotName39,rchSlotName40,rchSlotName41,rchSlotName42,rchSlotName43,rchSlotName44,rchSlotName45,rchSlotName46,rchSlotName47,rchSlotName48,rchSlotName49,rchSlotName50,rchSlotName51,rchSlotName52,rchSlotName53,rchSlotName54,rchSlotName55,rchSlotName56,rchSlotName57,rchSlotName58,rchSlotName59,rchSlotName60,rchSlotName61,rchSlotName62,rchSlotName63,rchSlotName64,rchSlotName65,rchSlotName66,rchSlotName67,rchSlotName68,rchSlotName69,rchSlotName70,rchSlotName71,rchSlotName72,rchSlotName73,rchSlotName74,rchSlotName75,rchSlotName76,rchSlotName77,rchSlotName78,rchSlotName79,rchSlotName80,rchSlotName81,rchSlotName82,rchSlotName83,rchSlotName84,rchSlotName85,rchSlotName86,rchSlotName87,rchSlotName88,rchSlotName89,rchSlotName90,rchSlotName91,rchSlotName92,rchSlotName93,rchSlotName94,rchSlotName95,rchSlotName96,rchSlotName97,rchSlotName98,rchSlotName99,rchSlotName100,rchSlotName101,rchSlotName102,rchSlotName103,rchSlotName104,rchSlotName105,rchSlotName106,rchSlotName107,rchSlotName108,rchSlotName109,rchSlotName110,rchSlotName111,rchSlotName112,rchSlotName113,rchSlotName114,rchSlotName115,rchSlotName116,rchSlotName117,rchSlotName118,rchSlotName119,rchSlotName120,rchSlotName121,rchSlotName122,rchSlotName123,rchSlotName124,rchSlotName125,rchSlotName126,rchSlotName127; + public string rchSlotName + { + get + { + return new string(new char[] { + (char)rchSlotName0, + (char)rchSlotName1, + (char)rchSlotName2, + (char)rchSlotName3, + (char)rchSlotName4, + (char)rchSlotName5, + (char)rchSlotName6, + (char)rchSlotName7, + (char)rchSlotName8, + (char)rchSlotName9, + (char)rchSlotName10, + (char)rchSlotName11, + (char)rchSlotName12, + (char)rchSlotName13, + (char)rchSlotName14, + (char)rchSlotName15, + (char)rchSlotName16, + (char)rchSlotName17, + (char)rchSlotName18, + (char)rchSlotName19, + (char)rchSlotName20, + (char)rchSlotName21, + (char)rchSlotName22, + (char)rchSlotName23, + (char)rchSlotName24, + (char)rchSlotName25, + (char)rchSlotName26, + (char)rchSlotName27, + (char)rchSlotName28, + (char)rchSlotName29, + (char)rchSlotName30, + (char)rchSlotName31, + (char)rchSlotName32, + (char)rchSlotName33, + (char)rchSlotName34, + (char)rchSlotName35, + (char)rchSlotName36, + (char)rchSlotName37, + (char)rchSlotName38, + (char)rchSlotName39, + (char)rchSlotName40, + (char)rchSlotName41, + (char)rchSlotName42, + (char)rchSlotName43, + (char)rchSlotName44, + (char)rchSlotName45, + (char)rchSlotName46, + (char)rchSlotName47, + (char)rchSlotName48, + (char)rchSlotName49, + (char)rchSlotName50, + (char)rchSlotName51, + (char)rchSlotName52, + (char)rchSlotName53, + (char)rchSlotName54, + (char)rchSlotName55, + (char)rchSlotName56, + (char)rchSlotName57, + (char)rchSlotName58, + (char)rchSlotName59, + (char)rchSlotName60, + (char)rchSlotName61, + (char)rchSlotName62, + (char)rchSlotName63, + (char)rchSlotName64, + (char)rchSlotName65, + (char)rchSlotName66, + (char)rchSlotName67, + (char)rchSlotName68, + (char)rchSlotName69, + (char)rchSlotName70, + (char)rchSlotName71, + (char)rchSlotName72, + (char)rchSlotName73, + (char)rchSlotName74, + (char)rchSlotName75, + (char)rchSlotName76, + (char)rchSlotName77, + (char)rchSlotName78, + (char)rchSlotName79, + (char)rchSlotName80, + (char)rchSlotName81, + (char)rchSlotName82, + (char)rchSlotName83, + (char)rchSlotName84, + (char)rchSlotName85, + (char)rchSlotName86, + (char)rchSlotName87, + (char)rchSlotName88, + (char)rchSlotName89, + (char)rchSlotName90, + (char)rchSlotName91, + (char)rchSlotName92, + (char)rchSlotName93, + (char)rchSlotName94, + (char)rchSlotName95, + (char)rchSlotName96, + (char)rchSlotName97, + (char)rchSlotName98, + (char)rchSlotName99, + (char)rchSlotName100, + (char)rchSlotName101, + (char)rchSlotName102, + (char)rchSlotName103, + (char)rchSlotName104, + (char)rchSlotName105, + (char)rchSlotName106, + (char)rchSlotName107, + (char)rchSlotName108, + (char)rchSlotName109, + (char)rchSlotName110, + (char)rchSlotName111, + (char)rchSlotName112, + (char)rchSlotName113, + (char)rchSlotName114, + (char)rchSlotName115, + (char)rchSlotName116, + (char)rchSlotName117, + (char)rchSlotName118, + (char)rchSlotName119, + (char)rchSlotName120, + (char)rchSlotName121, + (char)rchSlotName122, + (char)rchSlotName123, + (char)rchSlotName124, + (char)rchSlotName125, + (char)rchSlotName126, + (char)rchSlotName127 + }).TrimEnd('\0'); + } + } +} [StructLayout(LayoutKind.Sequential)] public struct VRActiveActionSet_t { public ulong ulActionSet; @@ -5833,6 +6496,7 @@ public enum EIOBufferMode public IntPtr m_pVRInput; // class vr::IVRInput * public IntPtr m_pVRIOBuffer; // class vr::IVRIOBuffer * public IntPtr m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * + public IntPtr m_pVRDebug; // class vr::IVRDebug * public IntPtr m_pVRNotifications; // class vr::IVRNotifications * } @@ -5929,7 +6593,7 @@ public class OpenVR public const ulong k_ulOverlayHandleInvalid = 0; public const uint k_unMaxDistortionFunctionParameters = 8; public const uint k_unScreenshotHandleInvalid = 0; - public const string IVRSystem_Version = "IVRSystem_019"; + public const string IVRSystem_Version = "IVRSystem_020"; public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; public const string IVRTrackedCamera_Version = "IVRTrackedCamera_005"; public const uint k_unMaxApplicationKeyLength = 128; @@ -5975,7 +6639,7 @@ public class OpenVR public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - public const string k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; + public const string k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; public const string k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; public const string k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; @@ -6003,13 +6667,15 @@ public class OpenVR public const string k_pch_SteamVR_DebugInput = "debugInput"; public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; - public const string k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; public const string k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; public const string k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; public const string k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; public const string k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; public const string k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + public const string k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + public const string k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + public const string k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; public const string k_pch_DirectMode_Section = "direct_mode"; public const string k_pch_DirectMode_Enable_Bool = "enable"; public const string k_pch_DirectMode_Count_Int32 = "count"; @@ -6105,6 +6771,7 @@ public class OpenVR public const string k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; public const string k_pch_modelskin_Section = "modelskins"; public const string k_pch_Driver_Enable_Bool = "enable"; + public const string k_pch_Driver_LoadPriority_Int32 = "loadPriority"; public const string k_pch_WebInterface_Section = "WebInterface"; public const string k_pch_WebInterface_WebEnable_Bool = "WebEnable"; public const string k_pch_WebInterface_WebPort_String = "WebPort"; @@ -6121,6 +6788,10 @@ public class OpenVR public const string k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; public const string k_pch_LastKnown_HMDModel_String = "HMDModel"; public const string k_pch_DismissedWarnings_Section = "DismissedWarnings"; + public const string k_pch_Input_Section = "input"; + public const string k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + public const string k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; + public const string k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; public const string IVRScreenshots_Version = "IVRScreenshots_001"; public const string IVRResources_Version = "IVRResources_001"; public const string IVRDriverManager_Version = "IVRDriverManager_001"; @@ -6128,11 +6799,12 @@ public class OpenVR public const uint k_unMaxActionSetNameLength = 64; public const uint k_unMaxActionOriginCount = 16; public const uint k_unMaxBoneNameLength = 32; - public const string IVRInput_Version = "IVRInput_006"; + public const string IVRInput_Version = "IVRInput_007"; public const ulong k_ulInvalidIOBufferHandle = 0; public const string IVRIOBuffer_Version = "IVRIOBuffer_002"; public const uint k_ulInvalidSpatialAnchorHandle = 0; public const string IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; + public const string IVRDebug_Version = "IVRDebug_001"; static uint VRToken { get; set; } @@ -6159,6 +6831,7 @@ public class OpenVR m_pVRIOBuffer = null; m_pVRSpatialAnchors = null; m_pVRNotifications = null; + m_pVRDebug = null; } void CheckClear() @@ -6352,6 +7025,19 @@ public class OpenVR return m_pVRSpatialAnchors; } + public CVRDebug VRDebug() + { + CheckClear(); + if (m_pVRDebug == null) + { + var eError = EVRInitError.None; + var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRDebug_Version, ref eError); + if (pInterface != IntPtr.Zero && eError == EVRInitError.None) + m_pVRDebug = new CVRDebug(pInterface); + } + return m_pVRDebug; + } + public CVRNotifications VRNotifications() { CheckClear(); @@ -6380,6 +7066,7 @@ public class OpenVR private CVRIOBuffer m_pVRIOBuffer; private CVRSpatialAnchors m_pVRSpatialAnchors; private CVRNotifications m_pVRNotifications; + private CVRDebug m_pVRDebug; }; private static COpenVRContext _OpenVRInternal_ModuleContext = null; @@ -6408,6 +7095,8 @@ public class OpenVR public static CVRIOBuffer IOBuffer { get { return OpenVRInternal_ModuleContext.VRIOBuffer(); } } public static CVRSpatialAnchors SpatialAnchors { get { return OpenVRInternal_ModuleContext.VRSpatialAnchors(); } } public static CVRNotifications Notifications { get { return OpenVRInternal_ModuleContext.VRNotifications(); } } + public static CVRDebug Debug { get { return OpenVRInternal_ModuleContext.VRDebug(); } } + /** Finds the active installation of vrclient.dll and initializes it */ public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "") diff --git a/third-party/openvr/headers/openvr_api.json b/third-party/openvr/headers/openvr_api.json index 6dc415f..89510f0 100644 --- a/third-party/openvr/headers/openvr_api.json +++ b/third-party/openvr/headers/openvr_api.json @@ -23,6 +23,7 @@ ,{"typedef": "vr::TextureID_t","type": "int32_t"} ,{"typedef": "vr::VRNotificationId","type": "uint32_t"} ,{"typedef": "vr::IOBufferHandle_t","type": "uint64_t"} +,{"typedef": "vr::VrProfilerEventHandle_t","type": "uint64_t"} ,{"typedef": "vr::HmdError","type": "enum vr::EVRInitError"} ,{"typedef": "vr::Hmd_Eye","type": "enum vr::EVREye"} ,{"typedef": "vr::ColorSpace","type": "enum vr::EColorSpace"} @@ -144,6 +145,7 @@ ,{"name": "Prop_BootloaderVersion_Uint64","value": "1044"} ,{"name": "Prop_AdditionalSystemReportData_String","value": "1045"} ,{"name": "Prop_CompositeFirmwareVersion_String","value": "1046"} + ,{"name": "Prop_Firmware_RemindUpdate_Bool","value": "1047"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -216,8 +218,12 @@ ,{"name": "Prop_CameraDistortionFunction_Int32_Array","value": "2072"} ,{"name": "Prop_CameraDistortionCoefficients_Float_Array","value": "2073"} ,{"name": "Prop_ExpectedControllerType_String","value": "2074"} + ,{"name": "Prop_HmdTrackingStyle_Int32","value": "2075"} + ,{"name": "Prop_DriverProvidedChaperoneVisibility_Bool","value": "2076"} ,{"name": "Prop_DisplayAvailableFrameRates_Float_Array","value": "2080"} ,{"name": "Prop_DisplaySupportsMultipleFramerates_Bool","value": "2081"} + ,{"name": "Prop_DisplayColorMultLeft_Vector3","value": "2082"} + ,{"name": "Prop_DisplayColorMultRight_Vector3","value": "2083"} ,{"name": "Prop_DashboardLayoutPathName_String","value": "2090"} ,{"name": "Prop_DriverRequestedMuraCorrectionMode_Int32","value": "2200"} ,{"name": "Prop_DriverRequestedMuraFeather_InnerLeft_Int32","value": "2201"} @@ -287,6 +293,12 @@ ,{"name": "TrackedProp_CannotWriteToWildcards","value": "12"} ,{"name": "TrackedProp_IPCReadFailure","value": "13"} ]} +, {"enumname": "vr::EHmdTrackingStyle","values": [ + {"name": "HmdTrackingStyle_Unknown","value": "0"} + ,{"name": "HmdTrackingStyle_Lighthouse","value": "1"} + ,{"name": "HmdTrackingStyle_OutsideInCameras","value": "2"} + ,{"name": "HmdTrackingStyle_InsideOutCameras","value": "3"} +]} , {"enumname": "vr::EVRSubmitFlags","values": [ {"name": "Submit_Default","value": "0"} ,{"name": "Submit_LensDistortionAlreadyApplied","value": "1"} @@ -519,6 +531,7 @@ ,{"name": "ShowUI_ManageTrackers","value": "1"} ,{"name": "ShowUI_Pairing","value": "3"} ,{"name": "ShowUI_Settings","value": "4"} + ,{"name": "ShowUI_DebugCommands","value": "5"} ]} , {"enumname": "vr::EHDCPError","values": [ {"name": "HDCPError_None","value": "0"} @@ -696,6 +709,7 @@ ,{"name": "VRInitError_Init_TrackerManagerInitFailed","value": "142"} ,{"name": "VRInitError_Init_AlreadyRunning","value": "143"} ,{"name": "VRInitError_Init_FailedForVrMonitor","value": "144"} + ,{"name": "VRInitError_Init_PropertyManagerInitFailed","value": "145"} ,{"name": "VRInitError_Driver_Failed","value": "200"} ,{"name": "VRInitError_Driver_Unknown","value": "201"} ,{"name": "VRInitError_Driver_HmdUnknown","value": "202"} @@ -718,6 +732,8 @@ ,{"name": "VRInitError_IPC_CompositorConnectFailed","value": "306"} ,{"name": "VRInitError_IPC_CompositorInvalidConnectResponse","value": "307"} ,{"name": "VRInitError_IPC_ConnectFailedAfterMultipleAttempts","value": "308"} + ,{"name": "VRInitError_IPC_ConnectFailedAfterTargetExited","value": "309"} + ,{"name": "VRInitError_IPC_NamespaceUnavailable","value": "310"} ,{"name": "VRInitError_Compositor_Failed","value": "400"} ,{"name": "VRInitError_Compositor_D3D11HardwareRequired","value": "401"} ,{"name": "VRInitError_Compositor_FirmwareRequiresUpdate","value": "402"} @@ -803,6 +819,8 @@ ,{"name": "VRInitError_Compositor_CreateTextIndexBuffer","value": "482"} ,{"name": "VRInitError_Compositor_CreateMirrorTextures","value": "483"} ,{"name": "VRInitError_Compositor_CreateLastFrameRenderTexture","value": "484"} + ,{"name": "VRInitError_Compositor_CreateMirrorOverlay","value": "485"} + ,{"name": "VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer","value": "486"} ,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"} ,{"name": "VRInitError_VendorSpecific_WindowsNotInDevMode","value": "1001"} ,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"} @@ -818,6 +836,7 @@ ,{"name": "VRInitError_VendorSpecific_HmdFound_UserDataAddressRange","value": "1111"} ,{"name": "VRInitError_VendorSpecific_HmdFound_UserDataError","value": "1112"} ,{"name": "VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck","value": "1113"} + ,{"name": "VRInitError_VendorSpecific_OculusRuntimeBadInstall","value": "1114"} ,{"name": "VRInitError_Steam_SteamInstallationNotFound","value": "2000"} ,{"name": "VRInitError_LastError","value": "2001"} ]} @@ -1003,6 +1022,7 @@ ,{"name": "VROverlayFlags_VisibleInDashboard","value": "15"} ,{"name": "VROverlayFlags_MakeOverlaysInteractiveIfVisible","value": "16"} ,{"name": "VROverlayFlags_SendVRSmoothScrollEvents","value": "17"} + ,{"name": "VROverlayFlags_ProtectedContent","value": "18"} ]} , {"enumname": "vr::VRMessageOverlayResponse","values": [ {"name": "VRMessageOverlayResponse_ButtonPress_0","value": "0"} @@ -1136,6 +1156,10 @@ ,{"name": "IOBufferMode_Write","value": "2"} ,{"name": "IOBufferMode_Create","value": "512"} ]} +, {"enumname": "vr::EVRDebugError","values": [ + {"name": "VRDebugError_Success","value": "0"} + ,{"name": "VRDebugError_BadParameter","value": "1"} +]} ], "consts":[{ "constname": "k_nDriverNone","consttype": "const uint32_t", "constval": "4294967295"} @@ -1218,7 +1242,7 @@ ,{ "constname": "k_unScreenshotHandleInvalid","consttype": "const uint32_t", "constval": "0"} ,{ - "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_019"} + "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_020"} ,{ "constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"} ,{ @@ -1310,7 +1334,7 @@ ,{ "constname": "k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float","consttype": "const char *const", "constval": "speakersForwardYawOffsetDegrees"} ,{ - "constname": "k_pch_SteamVR_BaseStationPowerManagement_Bool","consttype": "const char *const", "constval": "basestationPowerManagement"} + "constname": "k_pch_SteamVR_BaseStationPowerManagement_Int32","consttype": "const char *const", "constval": "basestationPowerManagement"} ,{ "constname": "k_pch_SteamVR_NeverKillProcesses_Bool","consttype": "const char *const", "constval": "neverKillProcesses"} ,{ @@ -1365,8 +1389,6 @@ "constname": "k_pch_SteamVR_DebugInputBinding","consttype": "const char *const", "constval": "debugInputBinding"} ,{ "constname": "k_pch_SteamVR_DoNotFadeToGrid","consttype": "const char *const", "constval": "doNotFadeToGrid"} -,{ - "constname": "k_pch_SteamVR_InputBindingUIBlock","consttype": "const char *const", "constval": "inputBindingUI"} ,{ "constname": "k_pch_SteamVR_RenderCameraMode","consttype": "const char *const", "constval": "renderCameraMode"} ,{ @@ -1379,6 +1401,12 @@ "constname": "k_pch_SteamVR_LastVersionNotice","consttype": "const char *const", "constval": "lastVersionNotice"} ,{ "constname": "k_pch_SteamVR_LastVersionNoticeDate","consttype": "const char *const", "constval": "lastVersionNoticeDate"} +,{ + "constname": "k_pch_SteamVR_HmdDisplayColorGainR_Float","consttype": "const char *const", "constval": "hmdDisplayColorGainR"} +,{ + "constname": "k_pch_SteamVR_HmdDisplayColorGainG_Float","consttype": "const char *const", "constval": "hmdDisplayColorGainG"} +,{ + "constname": "k_pch_SteamVR_HmdDisplayColorGainB_Float","consttype": "const char *const", "constval": "hmdDisplayColorGainB"} ,{ "constname": "k_pch_DirectMode_Section","consttype": "const char *const", "constval": "direct_mode"} ,{ @@ -1569,6 +1597,8 @@ "constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"} ,{ "constname": "k_pch_Driver_Enable_Bool","consttype": "const char *const", "constval": "enable"} +,{ + "constname": "k_pch_Driver_LoadPriority_Int32","consttype": "const char *const", "constval": "loadPriority"} ,{ "constname": "k_pch_WebInterface_Section","consttype": "const char *const", "constval": "WebInterface"} ,{ @@ -1601,6 +1631,14 @@ "constname": "k_pch_LastKnown_HMDModel_String","consttype": "const char *const", "constval": "HMDModel"} ,{ "constname": "k_pch_DismissedWarnings_Section","consttype": "const char *const", "constval": "DismissedWarnings"} +,{ + "constname": "k_pch_Input_Section","consttype": "const char *const", "constval": "input"} +,{ + "constname": "k_pch_Input_LeftThumbstickRotation_Float","consttype": "const char *const", "constval": "leftThumbstickRotation"} +,{ + "constname": "k_pch_Input_RightThumbstickRotation_Float","consttype": "const char *const", "constval": "rightThumbstickRotation"} +,{ + "constname": "k_pch_Input_ThumbstickDeadzone_Float","consttype": "const char *const", "constval": "thumbstickDeadzone"} ,{ "constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"} ,{ @@ -1616,7 +1654,7 @@ ,{ "constname": "k_unMaxBoneNameLength","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_006"} + "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_007"} ,{ "constname": "k_ulInvalidIOBufferHandle","consttype": "const uint64_t", "constval": "0"} ,{ @@ -1625,6 +1663,8 @@ "constname": "k_ulInvalidSpatialAnchorHandle","consttype": "const SpatialAnchorHandle_t", "constval": "0"} ,{ "constname": "IVRSpatialAnchors_Version","consttype": "const char *const", "constval": "IVRSpatialAnchors_001"} +,{ + "constname": "IVRDebug_Version","consttype": "const char *const", "constval": "IVRDebug_001"} ], "structs":[{"struct": "vr::HmdMatrix34_t","fields": [ { "fieldname": "m", "fieldtype": "float [3][4]"}]} @@ -1883,20 +1923,6 @@ { "fieldname": "nFrameSequence", "fieldtype": "uint32_t"}, { "fieldname": "standingTrackedDevicePose", "fieldtype": "struct vr::TrackedDevicePose_t"}, { "fieldname": "ulFrameExposureTime", "fieldtype": "uint64_t"}]} -,{"struct": "vr::DriverDirectMode_FrameTiming","fields": [ -{ "fieldname": "m_nSize", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nNumMisPresented", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]} -,{"struct": "vr::ImuSample_t","fields": [ -{ "fieldname": "fSampleTime", "fieldtype": "double"}, -{ "fieldname": "vAccel", "fieldtype": "struct vr::HmdVector3d_t"}, -{ "fieldname": "vGyro", "fieldtype": "struct vr::HmdVector3d_t"}, -{ "fieldname": "unOffScaleFlags", "fieldtype": "uint32_t"}]} -,{"struct": "vr::AppOverrideKeys_t","fields": [ -{ "fieldname": "pchKey", "fieldtype": "const char *"}, -{ "fieldname": "pchValue", "fieldtype": "const char *"}]} ,{"struct": "vr::Compositor_FrameTiming","fields": [ { "fieldname": "m_nSize", "fieldtype": "uint32_t"}, { "fieldname": "m_nFrameIndex", "fieldtype": "uint32_t"}, @@ -1924,6 +1950,20 @@ { "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"}, { "fieldname": "m_nNumVSyncsReadyForUse", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumVSyncsToFirstView", "fieldtype": "uint32_t"}]} +,{"struct": "vr::DriverDirectMode_FrameTiming","fields": [ +{ "fieldname": "m_nSize", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumMisPresented", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]} +,{"struct": "vr::ImuSample_t","fields": [ +{ "fieldname": "fSampleTime", "fieldtype": "double"}, +{ "fieldname": "vAccel", "fieldtype": "struct vr::HmdVector3d_t"}, +{ "fieldname": "vGyro", "fieldtype": "struct vr::HmdVector3d_t"}, +{ "fieldname": "unOffScaleFlags", "fieldtype": "uint32_t"}]} +,{"struct": "vr::AppOverrideKeys_t","fields": [ +{ "fieldname": "pchKey", "fieldtype": "const char *"}, +{ "fieldname": "pchValue", "fieldtype": "const char *"}]} ,{"struct": "vr::Compositor_CumulativeStats","fields": [ { "fieldname": "m_nPid", "fieldtype": "uint32_t"}, { "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, @@ -2018,6 +2058,11 @@ { "fieldname": "devicePath", "fieldtype": "VRInputValueHandle_t"}, { "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, { "fieldname": "rchRenderModelComponentName", "fieldtype": "char [128]"}]} +,{"struct": "vr::InputBindingInfo_t","fields": [ +{ "fieldname": "rchDevicePathName", "fieldtype": "char [128]"}, +{ "fieldname": "rchInputPathName", "fieldtype": "char [128]"}, +{ "fieldname": "rchModeName", "fieldtype": "char [128]"}, +{ "fieldname": "rchSlotName", "fieldtype": "char [128]"}]} ,{"struct": "vr::VRActiveActionSet_t","fields": [ { "fieldname": "ulActionSet", "fieldtype": "VRActionSetHandle_t"}, { "fieldname": "ulRestrictedToDevice", "fieldtype": "VRInputValueHandle_t"}, @@ -2046,6 +2091,7 @@ { "fieldname": "m_pVRInput", "fieldtype": "class vr::IVRInput *"}, { "fieldname": "m_pVRIOBuffer", "fieldtype": "class vr::IVRIOBuffer *"}, { "fieldname": "m_pVRSpatialAnchors", "fieldtype": "class vr::IVRSpatialAnchors *"}, +{ "fieldname": "m_pVRDebug", "fieldtype": "class vr::IVRDebug *"}, { "fieldname": "m_pVRNotifications", "fieldtype": "class vr::IVRNotifications *"}]} ], "methods":[{ @@ -2418,17 +2464,6 @@ "methodname": "ShouldApplicationReduceRenderingWork", "returntype": "bool" } -,{ - "classname": "vr::IVRSystem", - "methodname": "DriverDebugRequest", - "returntype": "uint32_t", - "params": [ -{ "paramname": "unDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, -{ "paramname": "pchRequest" ,"paramtype": "const char *"}, -{ "paramname": "pchResponseBuffer" ,"out_string": " " ,"paramtype": "char *"}, -{ "paramname": "unResponseBufferSize" ,"paramtype": "uint32_t"} - ] -} ,{ "classname": "vr::IVRSystem", "methodname": "PerformFirmwareUpdate", @@ -2447,6 +2482,20 @@ "methodname": "AcknowledgeQuit_UserPrompt", "returntype": "void" } +,{ + "classname": "vr::IVRSystem", + "methodname": "GetAppContainerFilePaths", + "returntype": "uint32_t", + "params": [ +{ "paramname": "pchBuffer" ,"out_string": " " ,"paramtype": "char *"}, +{ "paramname": "unBufferSize" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRSystem", + "methodname": "GetRuntimeVersion", + "returntype": "const char *" +} ,{ "classname": "vr::IVRExtendedDisplay", "methodname": "GetWindowBounds", @@ -4626,6 +4675,14 @@ { "paramname": "pchDriverName" ,"paramtype": "const char *"} ] } +,{ + "classname": "vr::IVRDriverManager", + "methodname": "IsEnabled", + "returntype": "bool", + "params": [ +{ "paramname": "nDriver" ,"paramtype": "vr::DriverId_t"} + ] +} ,{ "classname": "vr::IVRInput", "methodname": "SetActionManifestPath", @@ -4870,6 +4927,18 @@ { "paramname": "unOriginInfoSize" ,"paramtype": "uint32_t"} ] } +,{ + "classname": "vr::IVRInput", + "methodname": "GetActionBindingInfo", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "pOriginInfo" ,"paramtype": "struct vr::InputBindingInfo_t *"}, +{ "paramname": "unBindingInfoSize" ,"paramtype": "uint32_t"}, +{ "paramname": "unBindingInfoCount" ,"paramtype": "uint32_t"}, +{ "paramname": "punReturnedBindingInfoCount" ,"paramtype": "uint32_t *"} + ] +} ,{ "classname": "vr::IVRInput", "methodname": "ShowActionOrigins", @@ -4992,5 +5061,41 @@ { "paramname": "punDescriptorBufferLenInOut" ,"paramtype": "uint32_t *"} ] } +,{ + "classname": "vr::IVRDebug", + "methodname": "EmitVrProfilerEvent", + "returntype": "vr::EVRDebugError", + "params": [ +{ "paramname": "pchMessage" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "vr::IVRDebug", + "methodname": "BeginVrProfilerEvent", + "returntype": "vr::EVRDebugError", + "params": [ +{ "paramname": "pHandleOut" ,"paramtype": "vr::VrProfilerEventHandle_t *"} + ] +} +,{ + "classname": "vr::IVRDebug", + "methodname": "FinishVrProfilerEvent", + "returntype": "vr::EVRDebugError", + "params": [ +{ "paramname": "hHandle" ,"paramtype": "vr::VrProfilerEventHandle_t"}, +{ "paramname": "pchMessage" ,"paramtype": "const char *"} + ] +} +,{ + "classname": "vr::IVRDebug", + "methodname": "DriverDebugRequest", + "returntype": "uint32_t", + "params": [ +{ "paramname": "unDeviceIndex" ,"paramtype": "vr::TrackedDeviceIndex_t"}, +{ "paramname": "pchRequest" ,"paramtype": "const char *"}, +{ "paramname": "pchResponseBuffer" ,"out_string": " " ,"paramtype": "char *"}, +{ "paramname": "unResponseBufferSize" ,"paramtype": "uint32_t"} + ] +} ] } \ No newline at end of file diff --git a/third-party/openvr/headers/openvr_capi.h b/third-party/openvr/headers/openvr_capi.h index 6cb9c44..5295a4e 100644 --- a/third-party/openvr/headers/openvr_capi.h +++ b/third-party/openvr/headers/openvr_capi.h @@ -103,7 +103,7 @@ static const unsigned int k_unControllerStateAxisCount = 5; static const unsigned long k_ulOverlayHandleInvalid = 0; static const unsigned int k_unMaxDistortionFunctionParameters = 8; static const unsigned int k_unScreenshotHandleInvalid = 0; -static const char * IVRSystem_Version = "IVRSystem_019"; +static const char * IVRSystem_Version = "IVRSystem_020"; static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_005"; static const unsigned int k_unMaxApplicationKeyLength = 128; @@ -149,7 +149,7 @@ static const char * k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; -static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; +static const char * k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; static const char * k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; @@ -177,13 +177,15 @@ static const char * k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32Bi static const char * k_pch_SteamVR_DebugInput = "debugInput"; static const char * k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; static const char * k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; -static const char * k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; static const char * k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; static const char * k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; static const char * k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; static const char * k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; static const char * k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; static const char * k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; +static const char * k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; +static const char * k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; +static const char * k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; static const char * k_pch_DirectMode_Section = "direct_mode"; static const char * k_pch_DirectMode_Enable_Bool = "enable"; static const char * k_pch_DirectMode_Count_Int32 = "count"; @@ -279,6 +281,7 @@ static const char * k_pch_Dashboard_UseWebIPD = "useWebIPD"; static const char * k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; static const char * k_pch_modelskin_Section = "modelskins"; static const char * k_pch_Driver_Enable_Bool = "enable"; +static const char * k_pch_Driver_LoadPriority_Int32 = "loadPriority"; static const char * k_pch_WebInterface_Section = "WebInterface"; static const char * k_pch_WebInterface_WebEnable_Bool = "WebEnable"; static const char * k_pch_WebInterface_WebPort_String = "WebPort"; @@ -295,6 +298,10 @@ static const char * k_pch_LastKnown_Section = "LastKnown"; static const char * k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; static const char * k_pch_LastKnown_HMDModel_String = "HMDModel"; static const char * k_pch_DismissedWarnings_Section = "DismissedWarnings"; +static const char * k_pch_Input_Section = "input"; +static const char * k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; +static const char * k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; +static const char * k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; static const char * IVRScreenshots_Version = "IVRScreenshots_001"; static const char * IVRResources_Version = "IVRResources_001"; static const char * IVRDriverManager_Version = "IVRDriverManager_001"; @@ -302,11 +309,12 @@ static const unsigned int k_unMaxActionNameLength = 64; static const unsigned int k_unMaxActionSetNameLength = 64; static const unsigned int k_unMaxActionOriginCount = 16; static const unsigned int k_unMaxBoneNameLength = 32; -static const char * IVRInput_Version = "IVRInput_006"; +static const char * IVRInput_Version = "IVRInput_007"; static const unsigned long k_ulInvalidIOBufferHandle = 0; static const char * IVRIOBuffer_Version = "IVRIOBuffer_002"; static const unsigned int k_ulInvalidSpatialAnchorHandle = 0; static const char * IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; +static const char * IVRDebug_Version = "IVRDebug_001"; // OpenVR Enums @@ -431,6 +439,7 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_BootloaderVersion_Uint64 = 1044, ETrackedDeviceProperty_Prop_AdditionalSystemReportData_String = 1045, ETrackedDeviceProperty_Prop_CompositeFirmwareVersion_String = 1046, + ETrackedDeviceProperty_Prop_Firmware_RemindUpdate_Bool = 1047, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -503,8 +512,12 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_CameraDistortionFunction_Int32_Array = 2072, ETrackedDeviceProperty_Prop_CameraDistortionCoefficients_Float_Array = 2073, ETrackedDeviceProperty_Prop_ExpectedControllerType_String = 2074, + ETrackedDeviceProperty_Prop_HmdTrackingStyle_Int32 = 2075, + ETrackedDeviceProperty_Prop_DriverProvidedChaperoneVisibility_Bool = 2076, ETrackedDeviceProperty_Prop_DisplayAvailableFrameRates_Float_Array = 2080, ETrackedDeviceProperty_Prop_DisplaySupportsMultipleFramerates_Bool = 2081, + ETrackedDeviceProperty_Prop_DisplayColorMultLeft_Vector3 = 2082, + ETrackedDeviceProperty_Prop_DisplayColorMultRight_Vector3 = 2083, ETrackedDeviceProperty_Prop_DashboardLayoutPathName_String = 2090, ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, @@ -577,6 +590,14 @@ typedef enum ETrackedPropertyError ETrackedPropertyError_TrackedProp_IPCReadFailure = 13, } ETrackedPropertyError; +typedef enum EHmdTrackingStyle +{ + EHmdTrackingStyle_HmdTrackingStyle_Unknown = 0, + EHmdTrackingStyle_HmdTrackingStyle_Lighthouse = 1, + EHmdTrackingStyle_HmdTrackingStyle_OutsideInCameras = 2, + EHmdTrackingStyle_HmdTrackingStyle_InsideOutCameras = 3, +} EHmdTrackingStyle; + typedef enum EVRSubmitFlags { EVRSubmitFlags_Submit_Default = 0, @@ -824,6 +845,7 @@ typedef enum EShowUIType EShowUIType_ShowUI_ManageTrackers = 1, EShowUIType_ShowUI_Pairing = 3, EShowUIType_ShowUI_Settings = 4, + EShowUIType_ShowUI_DebugCommands = 5, } EShowUIType; typedef enum EHDCPError @@ -1029,6 +1051,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_Init_TrackerManagerInitFailed = 142, EVRInitError_VRInitError_Init_AlreadyRunning = 143, EVRInitError_VRInitError_Init_FailedForVrMonitor = 144, + EVRInitError_VRInitError_Init_PropertyManagerInitFailed = 145, EVRInitError_VRInitError_Driver_Failed = 200, EVRInitError_VRInitError_Driver_Unknown = 201, EVRInitError_VRInitError_Driver_HmdUnknown = 202, @@ -1051,6 +1074,8 @@ typedef enum EVRInitError EVRInitError_VRInitError_IPC_CompositorConnectFailed = 306, EVRInitError_VRInitError_IPC_CompositorInvalidConnectResponse = 307, EVRInitError_VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + EVRInitError_VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + EVRInitError_VRInitError_IPC_NamespaceUnavailable = 310, EVRInitError_VRInitError_Compositor_Failed = 400, EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401, EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402, @@ -1136,6 +1161,8 @@ typedef enum EVRInitError EVRInitError_VRInitError_Compositor_CreateTextIndexBuffer = 482, EVRInitError_VRInitError_Compositor_CreateMirrorTextures = 483, EVRInitError_VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + EVRInitError_VRInitError_Compositor_CreateMirrorOverlay = 485, + EVRInitError_VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, @@ -1151,6 +1178,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + EVRInitError_VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000, EVRInitError_VRInitError_LastError = 2001, } EVRInitError; @@ -1376,6 +1404,7 @@ typedef enum VROverlayFlags VROverlayFlags_VisibleInDashboard = 15, VROverlayFlags_MakeOverlaysInteractiveIfVisible = 16, VROverlayFlags_SendVRSmoothScrollEvents = 17, + VROverlayFlags_ProtectedContent = 18, } VROverlayFlags; typedef enum VRMessageOverlayResponse @@ -1550,6 +1579,12 @@ typedef enum EIOBufferMode EIOBufferMode_IOBufferMode_Create = 512, } EIOBufferMode; +typedef enum EVRDebugError +{ + EVRDebugError_VRDebugError_Success = 0, + EVRDebugError_VRDebugError_BadParameter = 1, +} EVRDebugError; + // OpenVR typedefs @@ -1579,6 +1614,7 @@ typedef uint32_t VRComponentProperties; typedef int32_t TextureID_t; typedef uint32_t VRNotificationId; typedef uint64_t IOBufferHandle_t; +typedef uint64_t VrProfilerEventHandle_t; typedef EVRInitError HmdError; typedef EVREye Hmd_Eye; typedef EColorSpace ColorSpace; @@ -1992,29 +2028,6 @@ typedef struct CameraVideoStreamFrameHeader_t uint64_t ulFrameExposureTime; } CameraVideoStreamFrameHeader_t; -typedef struct DriverDirectMode_FrameTiming -{ - uint32_t m_nSize; - uint32_t m_nNumFramePresents; - uint32_t m_nNumMisPresented; - uint32_t m_nNumDroppedFrames; - uint32_t m_nReprojectionFlags; -} DriverDirectMode_FrameTiming; - -typedef struct ImuSample_t -{ - double fSampleTime; - struct HmdVector3d_t vAccel; - struct HmdVector3d_t vGyro; - uint32_t unOffScaleFlags; -} ImuSample_t; - -typedef struct AppOverrideKeys_t -{ - char * pchKey; // const char * - char * pchValue; // const char * -} AppOverrideKeys_t; - typedef struct Compositor_FrameTiming { uint32_t m_nSize; @@ -2045,6 +2058,29 @@ typedef struct Compositor_FrameTiming uint32_t m_nNumVSyncsToFirstView; } Compositor_FrameTiming; +typedef struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; + uint32_t m_nNumFramePresents; + uint32_t m_nNumMisPresented; + uint32_t m_nNumDroppedFrames; + uint32_t m_nReprojectionFlags; +} DriverDirectMode_FrameTiming; + +typedef struct ImuSample_t +{ + double fSampleTime; + struct HmdVector3d_t vAccel; + struct HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +} ImuSample_t; + +typedef struct AppOverrideKeys_t +{ + char * pchKey; // const char * + char * pchValue; // const char * +} AppOverrideKeys_t; + typedef struct Compositor_CumulativeStats { uint32_t m_nPid; @@ -2196,6 +2232,14 @@ typedef struct InputOriginInfo_t char rchRenderModelComponentName[128]; //char[128] } InputOriginInfo_t; +typedef struct InputBindingInfo_t +{ + char rchDevicePathName[128]; //char[128] + char rchInputPathName[128]; //char[128] + char rchModeName[128]; //char[128] + char rchSlotName[128]; //char[128] +} InputBindingInfo_t; + typedef struct VRActiveActionSet_t { VRActionSetHandle_t ulActionSet; @@ -2234,6 +2278,7 @@ typedef struct COpenVRContext intptr_t m_pVRInput; // class vr::IVRInput * intptr_t m_pVRIOBuffer; // class vr::IVRIOBuffer * intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * + intptr_t m_pVRDebug; // class vr::IVRDebug * intptr_t m_pVRNotifications; // class vr::IVRNotifications * } COpenVRContext; @@ -2349,10 +2394,11 @@ struct VR_IVRSystem_FnTable bool (OPENVR_FNTABLE_CALLTYPE *IsSteamVRDrawingControllers)(); bool (OPENVR_FNTABLE_CALLTYPE *ShouldApplicationPause)(); bool (OPENVR_FNTABLE_CALLTYPE *ShouldApplicationReduceRenderingWork)(); - uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize); EVRFirmwareError (OPENVR_FNTABLE_CALLTYPE *PerformFirmwareUpdate)(TrackedDeviceIndex_t unDeviceIndex); void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_Exiting)(); void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_UserPrompt)(); + uint32_t (OPENVR_FNTABLE_CALLTYPE *GetAppContainerFilePaths)(char * pchBuffer, uint32_t unBufferSize); + char * (OPENVR_FNTABLE_CALLTYPE *GetRuntimeVersion)(); }; struct VR_IVRExtendedDisplay_FnTable @@ -2652,6 +2698,7 @@ struct VR_IVRDriverManager_FnTable uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverCount)(); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverName)(DriverId_t nDriver, char * pchValue, uint32_t unBufferSize); DriverHandle_t (OPENVR_FNTABLE_CALLTYPE *GetDriverHandle)(char * pchDriverName); + bool (OPENVR_FNTABLE_CALLTYPE *IsEnabled)(DriverId_t nDriver); }; struct VR_IVRInput_FnTable @@ -2679,6 +2726,7 @@ struct VR_IVRInput_FnTable EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginLocalizedName)(VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, struct InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionBindingInfo)(VRActionHandle_t action, struct InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowBindingsForActionSet)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); bool (OPENVR_FNTABLE_CALLTYPE *IsUsingLegacyInput)(); @@ -2702,6 +2750,14 @@ struct VR_IVRSpatialAnchors_FnTable EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *GetSpatialAnchorDescriptor)(SpatialAnchorHandle_t unHandle, char * pchDescriptorOut, uint32_t * punDescriptorBufferLenInOut); }; +struct VR_IVRDebug_FnTable +{ + EVRDebugError (OPENVR_FNTABLE_CALLTYPE *EmitVrProfilerEvent)(char * pchMessage); + EVRDebugError (OPENVR_FNTABLE_CALLTYPE *BeginVrProfilerEvent)(VrProfilerEventHandle_t * pHandleOut); + EVRDebugError (OPENVR_FNTABLE_CALLTYPE *FinishVrProfilerEvent)(VrProfilerEventHandle_t hHandle, char * pchMessage); + uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize); +}; + #if 0 // Global entry points diff --git a/third-party/openvr/headers/openvr_driver.h b/third-party/openvr/headers/openvr_driver.h index 960042e..54d26d8 100644 --- a/third-party/openvr/headers/openvr_driver.h +++ b/third-party/openvr/headers/openvr_driver.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 4; - static const uint32_t k_nSteamVRVersionBuild = 18; + static const uint32_t k_nSteamVRVersionMinor = 6; + static const uint32_t k_nSteamVRVersionBuild = 10; } // namespace vr // vrtypes.h @@ -354,6 +354,7 @@ enum ETrackedDeviceProperty Prop_BootloaderVersion_Uint64 = 1044, Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports + Prop_Firmware_RemindUpdate_Bool = 1047, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -408,7 +409,7 @@ enum ETrackedDeviceProperty Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded - Prop_DoNotApplyPrediction_Bool = 2054, + Prop_DoNotApplyPrediction_Bool = 2054, // currently no effect. was used to disable HMD pose prediction on MR, which is now done by MR driver setting velocity=0 Prop_CameraToHeadTransforms_Matrix34_Array = 2055, Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion Prop_DriverIsDrawingControllers_Bool = 2057, @@ -429,9 +430,14 @@ enum ETrackedDeviceProperty Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras) Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras) Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user + Prop_DisplayColorMultLeft_Vector3 = 2082, + Prop_DisplayColorMultRight_Vector3 = 2083, Prop_DashboardLayoutPathName_String = 2090, @@ -527,6 +533,15 @@ enum ETrackedPropertyError TrackedProp_IPCReadFailure = 13, }; +/** Used to drive certain text in the UI when talking about the tracking system for the HMD */ +enum EHmdTrackingStyle +{ + HmdTrackingStyle_Unknown = 0, + + HmdTrackingStyle_Lighthouse = 1, // base stations and lasers + HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style + HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world +}; typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; @@ -1110,6 +1125,7 @@ enum EShowUIType // ShowUI_QuickStart = 2, // Deprecated ShowUI_Pairing = 3, ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, }; struct VREvent_ShowUI_t @@ -1514,6 +1530,7 @@ enum EVRInitError VRInitError_Init_TrackerManagerInitFailed = 142, VRInitError_Init_AlreadyRunning = 143, VRInitError_Init_FailedForVrMonitor = 144, + VRInitError_Init_PropertyManagerInitFailed = 145, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1539,6 +1556,8 @@ enum EVRInitError VRInitError_IPC_CompositorConnectFailed = 306, VRInitError_IPC_CompositorInvalidConnectResponse = 307, VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + VRInitError_IPC_NamespaceUnavailable = 310, VRInitError_Compositor_Failed = 400, VRInitError_Compositor_D3D11HardwareRequired = 401, @@ -1625,6 +1644,8 @@ enum EVRInitError VRInitError_Compositor_CreateTextIndexBuffer = 482, VRInitError_Compositor_CreateMirrorTextures = 483, VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + VRInitError_Compositor_CreateMirrorOverlay = 485, + VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1642,6 +1663,7 @@ enum EVRInitError VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, VRInitError_Steam_SteamInstallationNotFound = 2000, @@ -1735,6 +1757,75 @@ typedef uint32_t ScreenshotHandle_t; static const uint32_t k_unScreenshotHandleInvalid = 0; +/** Compositor frame timing reprojection flags. */ +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame + +const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if + // it detects the application is taking too long to render. These two + // bits will contain the count of additional frames (normally zero). + // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from + // the latest frame timing entry. + +const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. + // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from + // the latest frame timing entry. + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; +}; + /** Frame timing data provided by direct mode drivers. */ struct DriverDirectMode_FrameTiming { @@ -2089,7 +2180,7 @@ namespace vr static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; @@ -2117,13 +2208,15 @@ namespace vr static const char * const k_pch_SteamVR_DebugInput = "debugInput"; 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_InputBindingUIBlock = "inputBindingUI"; 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"; static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; //----------------------------------------------------------------------------- // direct mode keys @@ -2261,6 +2354,7 @@ namespace vr //----------------------------------------------------------------------------- // driver keys - These could be checked in any driver_ section static const char * const k_pch_Driver_Enable_Bool = "enable"; + static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; //----------------------------------------------------------------------------- // web interface keys @@ -2303,6 +2397,14 @@ namespace vr // Dismissed warnings static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + //----------------------------------------------------------------------------- + // Input Settings + static const char * const k_pch_Input_Section = "input"; + static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; + static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; + + } // namespace vr // iservertrackeddevicedriver.h @@ -2757,6 +2859,9 @@ public: float GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); int32_t GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); uint64_t GetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector2_t GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector3_t GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); + HmdVector4_t GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); /** Returns a single typed property. If the device index is not valid or the property is not a string type this function will * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing @@ -2782,6 +2887,9 @@ public: ETrackedPropertyError SetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, float fNewValue ); ETrackedPropertyError SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue ); ETrackedPropertyError SetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, uint64_t ulNewValue ); + ETrackedPropertyError SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue ); + ETrackedPropertyError SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue ); + ETrackedPropertyError SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue ); /** Sets a string property. The new value will be returned on any subsequent call to get this property in any process. */ ETrackedPropertyError SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue ); @@ -2959,7 +3067,6 @@ inline bool CVRPropertyHelpers::GetBoolProperty( PropertyContainerHandle_t ulCon return GetPropertyHelper( ulContainerHandle, prop, pError, false, k_unBoolPropertyTag ); } - inline float CVRPropertyHelpers::GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) { return GetPropertyHelper( ulContainerHandle, prop, pError, 0.f, k_unFloatPropertyTag ); @@ -2975,6 +3082,24 @@ inline uint64_t CVRPropertyHelpers::GetUint64Property( PropertyContainerHandle_t return GetPropertyHelper( ulContainerHandle, prop, pError, 0, k_unUint64PropertyTag ); } +inline HmdVector2_t CVRPropertyHelpers::GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector2_t defaultval = { 0 }; + return GetPropertyHelper( ulContainerHandle, prop, pError, defaultval, k_unHmdVector2PropertyTag ); +} + +inline HmdVector3_t CVRPropertyHelpers::GetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector3_t defaultval = { 0 }; + return GetPropertyHelper( ulContainerHandle, prop, pError, defaultval, k_unHmdVector3PropertyTag ); +} + +inline HmdVector4_t CVRPropertyHelpers::GetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) +{ + HmdVector4_t defaultval = { 0 }; + return GetPropertyHelper( ulContainerHandle, prop, pError, defaultval, k_unHmdVector4PropertyTag ); +} + inline ETrackedPropertyError CVRPropertyHelpers::SetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, bool bNewValue ) { return SetProperty( ulContainerHandle, prop, &bNewValue, sizeof( bNewValue ), k_unBoolPropertyTag ); @@ -2995,6 +3120,21 @@ inline ETrackedPropertyError CVRPropertyHelpers::SetUint64Property( PropertyCont return SetProperty( ulContainerHandle, prop, &ulNewValue, sizeof( ulNewValue ), k_unUint64PropertyTag ); } +inline ETrackedPropertyError CVRPropertyHelpers::SetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector2_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector2_t ), k_unHmdVector2PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetVec3Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector3_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector3_t ), k_unHmdVector3PropertyTag ); +} + +inline ETrackedPropertyError CVRPropertyHelpers::SetVec4Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const HmdVector4_t & vNewValue ) +{ + return SetProperty( ulContainerHandle, prop, ( void * ) &vNewValue, sizeof( HmdVector4_t ), k_unHmdVector4PropertyTag ); +} + /** Sets the error return value for a property. This value will be returned on all subsequent requests to get the property */ inline ETrackedPropertyError CVRPropertyHelpers::SetPropertyError( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError eError ) { @@ -3195,6 +3335,10 @@ public: /** 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; }; static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_005"; @@ -3282,10 +3426,10 @@ class IVRWatchdogHost public: /** Client drivers in watchdog mode should call this when they have received a signal from hardware that should * cause SteamVR to start */ - virtual void WatchdogWakeUp() = 0; + virtual void WatchdogWakeUp( vr::ETrackedDeviceClass eDeviceClass ) = 0; }; -static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_001"; +static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_002"; }; @@ -3415,6 +3559,8 @@ public: virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; + + virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0; }; static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; diff --git a/third-party/openvr/lib/linux32/libopenvr_api.so b/third-party/openvr/lib/linux32/libopenvr_api.so index 79b4e11..e4b3dcd 100644 Binary files a/third-party/openvr/lib/linux32/libopenvr_api.so and b/third-party/openvr/lib/linux32/libopenvr_api.so differ diff --git a/third-party/openvr/lib/linux64/libopenvr_api.so b/third-party/openvr/lib/linux64/libopenvr_api.so index fea27b3..e8d57d3 100644 Binary files a/third-party/openvr/lib/linux64/libopenvr_api.so and b/third-party/openvr/lib/linux64/libopenvr_api.so differ