diff --git a/build_scripts/compile_version_string.txt b/build_scripts/compile_version_string.txt index d9b7e3ab..2ee7a12d 100644 --- a/build_scripts/compile_version_string.txt +++ b/build_scripts/compile_version_string.txt @@ -1 +1 @@ -5.8.13-release \ No newline at end of file +5.8.17-release diff --git a/build_scripts/qt/compilers/msvc.pri b/build_scripts/qt/compilers/msvc.pri index 4ff8b445..b7c169f5 100644 --- a/build_scripts/qt/compilers/msvc.pri +++ b/build_scripts/qt/compilers/msvc.pri @@ -9,4 +9,4 @@ warnings_as_errors { QMAKE_CXXFLAGS += /GL # Force standards-conformance -QMAKE_CXXFLAGS += /permissive- +# QMAKE_CXXFLAGS += /permissive- diff --git a/src/overlaycontroller.cpp b/src/overlaycontroller.cpp index 3c65941a..5867ab64 100644 --- a/src/overlaycontroller.cpp +++ b/src/overlaycontroller.cpp @@ -1235,17 +1235,39 @@ void OverlayController::mainEventLoop() LOG( DEBUG ) << "Dashboard deactivated"; m_dashboardVisible = false; settings::saveChangedSettings(); + if(0UL != m_lastTextUID){ + submitLastTextField(m_lastTextUID); + m_lastTextUID = 0; + } } break; - case vr::VREvent_KeyboardDone: + case vr::VREvent_HideKeyboard: { - char keyboardBuffer[1024]; - vr::VROverlay()->GetKeyboardText( keyboardBuffer, 1024 ); + if(0UL != m_lastTextUID){ + submitLastTextField(m_lastTextUID); + m_lastTextUID = 0; + } + } + break; + + case vr::VREvent_KeyboardCharInput: + { + char keyboardBuffer[64]; + vr::VROverlay()->GetKeyboardText( keyboardBuffer, 64 ); emit keyBoardInputSignal( QString( keyboardBuffer ), static_cast( vrEvent.data.keyboard.uUserValue ) ); + m_lastTextUID = static_cast(vrEvent.data.keyboard.uUserValue); } + // case vr::VREvent_KeyboardDone: + // { + // char keyboardBuffer[1024]; + // vr::VROverlay()->GetKeyboardText( keyboardBuffer, 1024 ); + // emit keyBoardInputSignal( QString( keyboardBuffer ), + // static_cast( + // vrEvent.data.keyboard.uUserValue ) ); + // } break; case vr::VREvent_SeatedZeroPoseReset: @@ -1572,11 +1594,20 @@ const vr::VROverlayHandle_t& OverlayController::overlayThumbnailHandle() void OverlayController::showKeyboard( QString existingText, unsigned long userValue ) { + // vr::VROverlay()->ShowKeyboardForOverlay( + // m_ulOverlayHandle, + // vr::k_EGamepadTextInputModeNormal, + // vr::k_EGamepadTextInputLineModeSingleLine, + // 0, + // "Advanced Settings Overlay", + // 1024, + // existingText.toStdString().c_str(), + // userValue ); vr::VROverlay()->ShowKeyboardForOverlay( m_ulOverlayHandle, vr::k_EGamepadTextInputModeNormal, vr::k_EGamepadTextInputLineModeSingleLine, - 0, + vr::KeyboardFlag_Modal+vr::KeyboardFlag_Minimal+vr::KeyboardFlag_HideDoneKey, "Advanced Settings Overlay", 1024, existingText.toStdString().c_str(), diff --git a/src/overlaycontroller.h b/src/overlaycontroller.h index 24b26d3c..0a1b16c8 100644 --- a/src/overlaycontroller.h +++ b/src/overlaycontroller.h @@ -1,5 +1,4 @@ #pragma once - #include #include // because of incompatibilities with QtOpenGL and GLEW we need to cherry pick @@ -131,6 +130,7 @@ class OverlayController : public QObject QString m_updateMessage = ""; QString m_optionalMessage = ""; QString m_versionCheckText = ""; + unsigned long m_lastTextUID = 0; QUrl m_runtimePathUrl; @@ -293,6 +293,7 @@ public slots: void autoApplyChaperoneEnabledChanged( bool value ); void soundVolumeChanged( double value ); void desktopModeToggleChanged( bool value ); + void submitLastTextField(unsigned long value = 0); }; } // namespace advsettings diff --git a/src/res/qml/common/MyTextField.qml b/src/res/qml/common/MyTextField.qml index cbfd81ac..ec3235cc 100644 --- a/src/res/qml/common/MyTextField.qml +++ b/src/res/qml/common/MyTextField.qml @@ -5,6 +5,7 @@ import ovras.advsettings 1.0 TextField { property int keyBoardUID: 0 property string savedText: "" + property bool active: false id: myTextField color: "#d9dbe0" text: "" @@ -18,19 +19,25 @@ TextField { } onClicked: { myTextField.forceActiveFocus() + active = true; } } onActiveFocusChanged: { if (activeFocus) { + active = true; if (!OverlayController.desktopMode) { OverlayController.showKeyboard(text, keyBoardUID) - } else { - savedText = text } + //savedText = text + } + //When box loses focus apply changes + else{ + myTextField.onInputEvent(text) + active = false; } } onEditingFinished: { - if (OverlayController.desktopMode && savedText !== text) { + if(OverlayController.desktopMode){ myTextField.onInputEvent(text) } } @@ -39,11 +46,47 @@ TextField { } Connections { target: OverlayController + + onSubmitLastTextField:{ + //value here is UID + if(value == 0){ + active = false; + return; + } + + if(value == keyBoardUID && active == true){ + myTextField.onInputEvent(text) + active = false; + } + } + onKeyBoardInputSignal: { if (userValue == keyBoardUID) { - if (myTextField.text !== input) { - myTextField.onInputEvent(input) + if(input == '\b'){ + myTextField.text = text.slice(0,-1) + return + } + else if(input == '\e'){ + myTextField.text = text.slice(0,cursorPosition)+text.slice(cursorposition+1) + return; + } + //Execute input + else if(input == '\n'){ + if(!OverlayController.desktopMode){ + //myTextField.onInputEvent(input) + myTextField.focus = false; + } + return; + } + else if(input=='\r'){ + return; + } + else{ + myTextField.text = text + input; } + //if (myTextField.text !== input) { + // myTextField.onInputEvent(input) + //} } } } diff --git a/src/tabcontrollers/MoveCenterTabController.cpp b/src/tabcontrollers/MoveCenterTabController.cpp index 190caa23..ec8ef061 100644 --- a/src/tabcontrollers/MoveCenterTabController.cpp +++ b/src/tabcontrollers/MoveCenterTabController.cpp @@ -274,10 +274,11 @@ void MoveCenterTabController::setTrackingUniverse( int value, bool notify ) if ( m_trackingUniverse != value ) { vr::VRChaperoneSetup()->HideWorkingSetPreview(); - if ( !m_roomSetupModeDetected && value == vr::TrackingUniverseStanding ) - { - reset(); - } + //TODO verify + // if ( !m_roomSetupModeDetected && value == vr::TrackingUniverseStanding ) + // { + // reset(); + // } m_trackingUniverse = value; if ( notify ) @@ -914,20 +915,15 @@ void MoveCenterTabController::incomingZeroReset() // aspects) IN mixed tracking environments I get this issue, the check if // there is an error and apply autosaved profile is hopefully a workaround - //This should catch OpenXR games, and helps prevent a loop on zero resets. - if(m_trackingUniverse==vr::TrackingUniverseRawAndUncalibrated){ - return; - } - - auto calState = vr::VRChaperone()->GetCalibrationState(); - LOG( INFO ) << "Calibration State on Recenter is: " << calState; - //Any Logging should be handled after openXR check to avoid spam; + //auto calState = vr::VRChaperone()->GetCalibrationState(); + //LOG( INFO ) << "Calibration State on Recenter is: " << calState; //TODO 8/3/2026 SteamFrame May Need special handling, will discuss With Valve currently //reset zero pose seems to move floor level as well as our changes, requiring 2 resets to set at correct level //or we could potentially not apply our offset during this process float offset[3] = { 0, 0, 0 }; offset[1] = -m_offsetY; + //TODO set universe center and seated recenter as 0 for this part vr::VRChaperoneSetup()->RevertWorkingCopy(); vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose( &m_universeCenterForReset ); @@ -939,12 +935,14 @@ void MoveCenterTabController::incomingZeroReset() return; } +//TODO 9/4/26 This needs to be looked at This moves the chaperone, and seems to do same thing as +//zerooffsets.... void MoveCenterTabController::reset() { // DO NOT attempt to apply autosaved profile on reset, as it is triggered by // the apply chaperone profile Side effects are bad! - auto calState = vr::VRChaperone()->GetCalibrationState(); - LOG( INFO ) << "Calibration State on Reset is: " << calState; + //auto calState = vr::VRChaperone()->GetCalibrationState(); + //LOG( INFO ) << "Calibration State on Reset is: " << calState; if ( !m_chaperoneBasisAcquired ) { @@ -1146,7 +1144,7 @@ void MoveCenterTabController::zeroOffsets() m_roomSetupModeDetected = false; } - LOG( INFO ) << "SUCCESS: Chaperone Data Updated and Offsets zeroed out"; + //LOG( INFO ) << "SUCCESS: Chaperone Data Updated and Offsets zeroed out"; } void MoveCenterTabController::sendSeatedRecenter() @@ -1893,8 +1891,9 @@ void MoveCenterTabController::resetOffsets( bool resetOffsetsJustPressed ) emit offsetZChanged( m_offsetZ ); emit rotationChanged( m_rotation ); updateSpace( true ); - auto calState = vr::VRChaperone()->GetCalibrationState(); - LOG( INFO ) << "Calibration State on Reset Offsets is: " << calState; + + //auto calState = vr::VRChaperone()->GetCalibrationState(); + //LOG( INFO ) << "Calibration State on Reset Offsets is: " << calState; // if ( calState > 199 && m_initComplete ) // { @@ -2623,7 +2622,7 @@ void MoveCenterTabController::updateSpace( bool forceUpdate ) } // keep the seated origin synced with offsets if in seated mode - if ( m_trackingUniverse == vr::TrackingUniverseSeated ) + if ( m_trackingUniverse == vr::TrackingUniverseSeated || m_trackingUniverse == vr::TrackingUniverseRawAndUncalibrated ) { vr::HmdMatrix34_t offsetSeatedCenter; @@ -2708,19 +2707,6 @@ void MoveCenterTabController::updateSpace( bool forceUpdate ) vr::VRChaperoneSetup()->SetWorkingStandingZeroPoseToRawTrackingPose( &offsetUniverseCenter ); - //openxr - //In OpenXR titles commitworkingcopy essentially causes zero resets, this is too much work, and causes lag - //As such we will update every third frame for OpenXR titles, this should be reasonably responsive. - //We may have to re-visit or make user adjustable - if(m_trackingUniverse==vr::TrackingUniverseRawAndUncalibrated){ - m_openXRSkip++; - if(m_openXRSkip % 5==0){ - vr::VRChaperoneSetup()->CommitWorkingCopy( - vr::EChaperoneConfigFile_Live ); - m_openXRSkip = 0; - } - } - //This is what actually throws you into the "working set" instead of live. vr::VRChaperoneSetup()->ShowWorkingSetPreview(); if ( m_collisionBoundsCountForReset > 0 ) diff --git a/src/tabcontrollers/SteamVRTabController.cpp b/src/tabcontrollers/SteamVRTabController.cpp index 05de1be3..09a67b8a 100644 --- a/src/tabcontrollers/SteamVRTabController.cpp +++ b/src/tabcontrollers/SteamVRTabController.cpp @@ -507,14 +507,13 @@ void SteamVRTabController::launchBindingUI() LOG( ERROR ) << "failed to get input handle? is your right controller on?"; } + bool desktopShow = false; if ( parent->isDesktopMode() ) { - QDesktopServices::openUrl( - QUrl( "http://127.0.0.1:27062/dashboard/controllerbinding.html" ) ); - return; + desktopShow = true; } auto error = vr::VRInput()->OpenBindingUI( - application_strings::applicationKey, actionHandle, inputHandle, false ); + application_strings::applicationKey, actionHandle, inputHandle, desktopShow ); if ( error != vr::VRInputError_None ) { LOG( ERROR ) << "Input Error: " << error; diff --git a/third-party/openvr/README.md b/third-party/openvr/README.md index 5976d622..083a48fd 100644 --- a/third-party/openvr/README.md +++ b/third-party/openvr/README.md @@ -1,13 +1,25 @@ OpenVR SDK --- -OpenVR is an API and runtime that allows access to VR hardware from multiple -vendors without requiring that applications have specific knowledge of the -hardware they are targeting. This repository is an SDK that contains the API -and samples. The runtime is under SteamVR in Tools on Steam. +OpenVR is an API and runtime that allows access to VR hardware from multiple +vendors without requiring that applications have specific knowledge of the +hardware they are targeting. This repository is an SDK that contains the API +and samples. The runtime is under SteamVR in Tools on Steam. ### Documentation -Documentation for the API is available on the [Github Wiki](https://github.com/ValveSoftware/openvr/wiki/API-Documentation) +#### Application API -More information on OpenVR and SteamVR can be found on http://steamvr.com +Documentation for the Application API is available on +the [GitHub Wiki](https://github.com/ValveSoftware/openvr/wiki/API-Documentation). + +#### Driver API + +Current documentation for the Driver API can be found in [docs/Driver_API_Documentation.md](docs/). + +* Old driver API documentation can still be found on + the [GitHub Wiki](https://github.com/ValveSoftware/openvr/wiki/Driver-Documentation). + +### About + +More information on OpenVR and SteamVR can be found on https://steamvr.com diff --git a/third-party/openvr/bin/linux32/libopenvr_api.so b/third-party/openvr/bin/linux32/libopenvr_api.so index 2c4b6a9b..8af2f119 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 ec08ba11..fb3d7cbe 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 c2a62d77..614970fc 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 30236661..2490cbd0 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/win32/openvr_api.dll b/third-party/openvr/bin/win32/openvr_api.dll index c77eaddd..5e2468e2 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 35cd4030..4d16416e 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 9bcb2863..83b20197 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 27c4ce5c..d5506b26 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 17d0e98b..7b25ab4e 100644 --- a/third-party/openvr/headers/openvr.h +++ b/third-party/openvr/headers/openvr.h @@ -15,9 +15,9 @@ namespace vr { - static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 26; - static const uint32_t k_nSteamVRVersionBuild = 7; + static const uint32_t k_nSteamVRVersionMajor = 2; + static const uint32_t k_nSteamVRVersionMinor = 15; + static const uint32_t k_nSteamVRVersionBuild = 6; } // namespace vr // public_vrtypes.h @@ -104,6 +104,16 @@ struct VRBoneTransform_t HmdQuaternionf_t orientation; }; +struct VREyeTrackingData_t +{ + bool bActive; + bool bValid; + bool bTracked; + + vr::HmdVector3_t vGazeOrigin; // Ray origin + vr::HmdVector3_t vGazeTarget; // Gaze target (fixation point) +}; + /** Used to return the post-distortion UVs for each color channel. * UVs range from 0 to 1 with 0,0 in the upper left corner of the * source render target. The 0,0 to 1,1 range covers a single eye. */ @@ -133,6 +143,9 @@ enum ETextureType TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which // are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right // eye texture (vr::EVREye::Eye_Right) + + TextureType_Reserved = 7, + TextureType_SharedTextureHandle = 8, // A pointer to a vr::SharedTextureHandle_t that was imported via, eg. ImportDmabuf. }; enum EColorSpace @@ -180,6 +193,17 @@ struct VRTextureWithPoseAndDepth_t : public VRTextureWithPose_t VRTextureDepthInfo_t depth; }; +struct VRTextureMotionInfo_t +{ + void *handle; // See ETextureType definition above + HmdMatrix44_t mDeltaPose; // Incremental application-applied transform, if any, since the previous frame that affects the view. +}; + +struct VRTextureWithMotion_t : VRTextureWithPoseAndDepth_t +{ + VRTextureMotionInfo_t motion; +}; + // 64-bit types that are part of public structures // that are replicated in shared memory. #if defined(__linux__) || defined(__APPLE__) @@ -190,6 +214,32 @@ typedef uint64_t vrshared_uint64_t; typedef double vrshared_double; #endif +static const uint32_t MaxDmabufPlaneCount = 4; + +struct DmabufPlane_t +{ + uint32_t unOffset; + uint32_t unStride; + int32_t nFd; // This is not consumed, it is dup'ed. +}; + +struct DmabufAttributes_t +{ + void *pNext; // MUST be NULL. Unused right now, but could be used to extend this structure in the future. + + uint32_t unWidth; + uint32_t unHeight; + uint32_t unDepth; + uint32_t unMipLevels; + uint32_t unArrayLayers; + uint32_t unSampleCount; + uint32_t unFormat; // DRM_FORMAT_ + uint64_t ulModifier; // DRM_FORMAT_MOD_ + + uint32_t unPlaneCount; + DmabufPlane_t plane[MaxDmabufPlaneCount]; +}; + #pragma pack( pop ) } // namespace vr @@ -432,6 +482,13 @@ enum ETrackedDeviceProperty Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, Prop_DevicePowerUsage_Float = 1052, Prop_IgnoreMotionForStandby_Bool = 1053, + Prop_ActualTrackingSystemName_String = 1054, // the literal local driver name in case someone is playing games with prop 1000 + Prop_AllowCameraToggle_Bool = 1055, // Shows the Enable/Disable camera option. Hide this for certain headsets if they have the camera tracking (since it's always on) + Prop_AllowLightSourceFrequency_Bool = 1056, // Shows the Anti-Flicker option in camera settings. + Prop_SteamRemoteClientID_Uint64 = 1057, // For vrlink + Prop_Reserved_1058 = 1058, + Prop_Reserved_1059 = 1059, + Prop_Reserved_1060 = 1060, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -439,7 +496,7 @@ enum ETrackedDeviceProperty Prop_DisplayFrequency_Float = 2002, Prop_UserIpdMeters_Float = 2003, Prop_CurrentUniverseId_Uint64 = 2004, - Prop_PreviousUniverseId_Uint64 = 2005, + Prop_PreviousUniverseId_Uint64_deprecated = Prop_Invalid, Prop_DisplayFirmwareVersion_Uint64 = 2006, Prop_IsOnDesktop_Bool = 2007, Prop_DisplayMCType_Int32 = 2008, @@ -524,10 +581,13 @@ enum ETrackedDeviceProperty Prop_CameraGlobalGain_Float = 2089, // Prop_DashboardLayoutPathName_String = 2090, // DELETED Prop_DashboardScale_Float = 2091, - Prop_PeerButtonInfo_String = 2092, + // Prop_PeerButtonInfo_String = 2092, // DELETED Prop_Hmd_SupportsHDR10_Bool = 2093, Prop_Hmd_EnableParallelRenderCameras_Bool = 2094, Prop_DriverProvidedChaperoneJson_String = 2095, // higher priority than Prop_DriverProvidedChaperonePath_String + Prop_ForceSystemLayerUseAppPoses_Bool = 2096, + Prop_DashboardLinkSupport_Int32 = 2097, + Prop_DisplayMinUIAnalogGain_Float = 2098, Prop_IpdUIRangeMinMeters_Float = 2100, Prop_IpdUIRangeMaxMeters_Float = 2101, @@ -537,10 +597,18 @@ enum ETrackedDeviceProperty Prop_Hmd_SupportsRoomViewDirect_Bool = 2105, Prop_Hmd_SupportsAppThrottling_Bool = 2106, Prop_Hmd_SupportsGpuBusMonitoring_Bool = 2107, + Prop_DriverDisplaysIPDChanges_Bool = 2108, + // Prop_Driver_RecenterSupport_Int32 = 2109, // DELETED + Prop_Reserved_2110 = 2110, + Prop_Reserved_2111 = 2111, + Prop_Reserved_2112 = 2112, + + Prop_Hmd_MaxDistortedTextureWidth_Int32 = 2113, + Prop_Hmd_MaxDistortedTextureHeight_Int32 = 2114, + Prop_Hmd_AllowSupersampleFiltering_Bool = 2115, - Prop_DSCVersion_Int32 = 2110, - Prop_DSCSliceCount_Int32 = 2111, - Prop_DSCBPPx16_Int32 = 2112, + Prop_Hmd_AllowsClientToControlTextureIndex = 2116, + Prop_Reserved_2117 = 2117, // Driver requested mura correction properties Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, @@ -553,10 +621,20 @@ enum ETrackedDeviceProperty Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, - Prop_Audio_DefaultPlaybackDeviceId_String = 2300, - Prop_Audio_DefaultRecordingDeviceId_String = 2301, - Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, - Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, + Prop_Audio_DriverManagesPlaybackVolumeControl_Bool = 2304, + Prop_Audio_DriverPlaybackVolume_Float = 2305, + Prop_Audio_DriverPlaybackMute_Bool = 2306, + Prop_Audio_DriverManagesRecordingVolumeControl_Bool = 2307, + Prop_Audio_DriverRecordingVolume_Float = 2308, + Prop_Audio_DriverRecordingMute_Bool = 2309, + + // Pipewire Audio Stuff + Prop_Audio_PipewirePlaybackNode_Int32 = 2400, + Prop_Audio_PipewireRecordingNode_Int32 = 2401, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -605,7 +683,11 @@ enum ETrackedDeviceProperty Prop_HasCameraComponent_Bool = 6004, Prop_HasDriverDirectModeComponent_Bool = 6005, Prop_HasVirtualDisplayComponent_Bool = 6006, - Prop_HasSpatialAnchorsSupport_Bool = 6007, + Prop_HasSpatialAnchorsSupport_Bool = 6007, + Prop_SupportsXrTextureSets_Bool = 6008, + Prop_SupportsXrEyeGazeInteraction_Bool = 6009, + Prop_DeviceHasNoIMU_Bool = 6010, + Prop_UseAdvancedPrediction_Bool = 6011, // Properties that are set internally based on other information provided by drivers Prop_ControllerType_String = 7000, @@ -616,6 +698,13 @@ enum ETrackedDeviceProperty Prop_VendorSpecific_Reserved_Start = 10000, Prop_VendorSpecific_Reserved_End = 10999, + // Addl SteamVR Reserved Space + Prop_Reserved_11000 = 11000, + Prop_Reserved_11001 = 11001, + Prop_Reserved_11002 = 11002, + Prop_Reserved_11003 = 11003, + Prop_Reserved_11004 = 11004, + Prop_TrackedDeviceProperty_Max = 1000000, }; @@ -656,10 +745,12 @@ enum EHmdTrackingStyle typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; typedef uint64_t VRInputValueHandle_t; +typedef uint64_t VRInputComponentHandle_t; static const VRActionHandle_t k_ulInvalidActionHandle = 0; static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0; static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0; +static const VRInputComponentHandle_t k_ulInvalidInputComponentHandle = 0; /** Allows the application to control how scene textures are used by the compositor when calling Submit. */ @@ -689,7 +780,7 @@ enum EVRSubmitFlags // Set to indicate a discontinuity between this and the last frame. // This will prevent motion smoothing from attempting to extrapolate using the pair. - Submit_FrameDiscontinuty = 0x20, + Submit_FrameDiscontinuity = 0x20, // Set to indicate that pTexture->handle is a contains VRVulkanTextureArrayData_t Submit_VulkanTextureWithArrayData = 0x40, @@ -697,10 +788,18 @@ enum EVRSubmitFlags // If the texture pointer passed in is an OpenGL Array texture, set this flag Submit_GlArrayTexture = 0x80, + // If the texture is an EGL texture and not an glX/wGL texture (Linux only, currently) + Submit_IsEgl = 0x100, + + // Set to indicate that pTexture is a pointer to a VRTextureWithMotion_t. + Submit_TextureWithMotion = 0x200 | Submit_TextureWithPose | Submit_TextureWithDepth, + // Do not use Submit_Reserved2 = 0x08000, Submit_Reserved3 = 0x10000, - + Submit_Reserved4 = 0x20000, + Submit_Reserved5 = 0x40000, + Submit_Reserved6 = 0x80000, }; /** Data required for passing Vulkan textures to IVRCompositor::Submit. @@ -768,6 +867,8 @@ enum EVREventType VREvent_PropertyChanged = 111, VREvent_WirelessDisconnect = 112, VREvent_WirelessReconnect = 113, + VREvent_Reserved_0114 = 114, + VREvent_Reserved_0115 = 115, VREvent_ButtonPress = 200, // data is controller VREvent_ButtonUnpress = 201, // data is controller @@ -793,8 +894,8 @@ enum EVREventType VREvent_OverlayFocusChanged = 307, // data is overlay, global event VREvent_ReloadOverlays = 308, VREvent_ScrollSmooth = 309, // data is scroll - VREvent_LockMousePosition = 310, - VREvent_UnlockMousePosition = 311, + VREvent_LockMousePosition = 310, // data is mouse + VREvent_UnlockMousePosition = 311, // data is mouse VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED @@ -817,12 +918,12 @@ enum EVREventType VREvent_ConsoleOpened = 420, VREvent_ConsoleClosed = 421, - VREvent_OverlayShown = 500, - VREvent_OverlayHidden = 501, + VREvent_OverlayShown = 500, // Indicates that an overlay is now visible to someone and should be rendering normally. Reflects IVROverlay::IsOverlayVisible() becoming true. + VREvent_OverlayHidden = 501, // Indicates that an overlay is no longer visible to someone and doesn't need to render frames. Reflects IVROverlay::IsOverlayVisible() becoming false. VREvent_DashboardActivated = 502, VREvent_DashboardDeactivated = 503, //VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent - VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + //VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay VREvent_ResetDashboard = 506, // Send to the overlay manager //VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID -- no longer sent VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading @@ -846,8 +947,8 @@ enum EVREventType VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted VREvent_PrimaryDashboardDeviceChanged = 525, - VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled - VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled + VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled (for scene apps only - not for construct or transient bounds) + VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled (for scene apps only - not for construct or transient bounds) VREvent_ShowUI = 528, // data is showUi VREvent_ShowDevTools = 529, // data is showDevTools VREvent_DesktopViewUpdating = 530, @@ -855,8 +956,23 @@ enum EVREventType VREvent_StartDashboard = 532, VREvent_ElevatePrism = 533, - - VREvent_OverlayClosed = 534, + VREvent_OverlayClosed = 534, // The overlay's close button is pressed. + VREvent_DashboardThumbChanged = 535, // Sent when a dashboard thumbnail image changes + VREvent_DesktopMightBeVisible = 536, // Sent when any known desktop related overlay is visible + VREvent_DesktopMightBeHidden = 537, // Sent when all known desktop related overlays are hidden + VREvent_MutualSteamCapabilitiesChanged = 538, // Sent when the set of capabilities common between both Steam and SteamVR have changed. + VREvent_OverlayCreated = 539, // An OpenVR overlay of any sort was created. Data is overlay. + VREvent_OverlayDestroyed = 540, // An OpenVR overlay of any sort was destroyed. Data is overlay. + VREvent_OverlayNameChanged = 544, // An OpenVR overlay's name changed. Data is overlay. + + VREvent_TrackingRecordingStarted = 541, + VREvent_TrackingRecordingStopped = 542, + VREvent_SetTrackingRecordingPath = 543, + + VREvent_Reserved_0560 = 560, // No data + VREvent_Reserved_0561 = 561, // No data + VREvent_Reserved_0562 = 562, // No data + VREvent_Reserved_0563 = 563, // No data VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -870,6 +986,7 @@ enum EVREventType VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR VREvent_InvalidateSwapTextureSets = 706, + VREvent_RequestDisconnectWirelessHMD = 707, // vrserver asks vrlink to disconnect VREvent_ChaperoneDataHasChanged = 800, // this will never happen with the new chaperone system VREvent_ChaperoneUniverseHasChanged = 801, @@ -878,8 +995,14 @@ enum EVREventType VREvent_SeatedZeroPoseReset = 804, VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() VREvent_ChaperoneRoomSetupStarting = 806, // Triggered by CVRChaperoneClient::RoomSetupStarting - VREvent_ChaperoneRoomSetupFinished = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy + VREvent_ChaperoneRoomSetupCommitted = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy (formerly VREvent_ChaperoneRoomSetupFinished) VREvent_StandingZeroPoseReset = 808, + VREvent_Reserved_0809 = 809, + VREvent_Reserved_0810 = 810, + VREvent_Reserved_0811 = 811, + VREvent_Reserved_0812 = 812, + VREvent_Reserved_0813 = 813, + VREvent_Reserved_0814 = 814, VREvent_AudioSettingsHaveChanged = 820, @@ -905,6 +1028,8 @@ enum EVREventType VREvent_GpuSpeedSectionSettingChanged = 869, VREvent_WindowsMRSectionSettingChanged = 870, VREvent_OtherSectionSettingChanged = 871, + VREvent_AnyDriverSettingsChanged = 872, + VREvent_Reserved_0873 = 873, VREvent_StatusUpdate = 900, @@ -915,9 +1040,11 @@ enum EVREventType VREvent_FirmwareUpdateStarted = 1100, VREvent_FirmwareUpdateFinished = 1101, - VREvent_KeyboardClosed = 1200, - VREvent_KeyboardCharInput = 1201, - VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + VREvent_KeyboardClosed = 1200, // DEPRECATED: Sent only to the overlay it closed for, or globally if it was closed for a scene app + VREvent_KeyboardCharInput = 1201, // Sent on keyboard input. Warning: event type appears as both global event and overlay event + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard. Warning: event type appears as both global event and overlay event + VREvent_KeyboardOpened_Global = 1203, // Sent globally when the keyboard is opened. data.keyboard.overlayHandle is who it was opened for (scene app if k_ulOverlayHandleInvalid) + VREvent_KeyboardClosed_Global = 1204, // Sent globally when the keyboard is closed. data.keyboard.overlayHandle is who it was opened for (scene app if k_ulOverlayHandleInvalid) //VREvent_ApplicationTransitionStarted = 1300, //VREvent_ApplicationTransitionAborted = 1301, @@ -975,6 +1102,13 @@ enum EVREventType VREvent_Monitor_ShowHeadsetView = 2000, // data is process VREvent_Monitor_HideHeadsetView = 2001, // data is process + VREvent_Audio_SetSpeakersVolume = 2100, + VREvent_Audio_SetSpeakersMute = 2101, + VREvent_Audio_SetMicrophoneVolume = 2102, + VREvent_Audio_SetMicrophoneMute = 2103, + + VREvent_RenderModel_CountChanged = 2200, //Number of RenderModels in the system has changed + // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, @@ -1056,6 +1190,10 @@ struct VREvent_Mouse_t { float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 uint32_t button; // EVRMouseButton enum + + // if from an event triggered by cursor input on an overlay that supports multiple cursors, this is the index of + // which tracked cursor the event is for + uint32_t cursorIndex; }; /** used for simulated mouse wheel scroll */ @@ -1064,6 +1202,10 @@ struct VREvent_Scroll_t float xdelta, ydelta; uint32_t unused; float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1] + + // if from an event triggered by cursor input on an overlay that supports multiple cursors, this is the index of + // which tracked cursor the event is for + uint32_t cursorIndex; }; /** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger @@ -1108,9 +1250,13 @@ struct VREvent_Process_t /** Used for a few events about overlays */ struct VREvent_Overlay_t { - uint64_t overlayHandle; + uint64_t overlayHandle; // VROverlayHandle_t uint64_t devicePath; uint64_t memoryBlockId; + + // if from an event triggered by cursor input on an overlay that supports multiple cursors, this is the index of + // which tracked cursor the event is for + uint32_t cursorIndex; }; @@ -1120,11 +1266,12 @@ struct VREvent_Status_t uint32_t statusState; // EVRState enum }; -/** Used for keyboard events **/ +/** Used for keyboard events */ struct VREvent_Keyboard_t { - char cNewInput[8]; // Up to 11 bytes of new input - uint64_t uUserValue; // Possible flags about the new input + char cNewInput[8]; // 7 bytes of utf8 + null + uint64_t uUserValue; // caller specified opaque token + uint64_t overlayHandle; // VROverlayHandle_t }; struct VREvent_Ipd_t @@ -1134,7 +1281,7 @@ struct VREvent_Ipd_t struct VREvent_Chaperone_t { - uint64_t m_nPreviousUniverse; + uint64_t m_nPreviousUniverse_deprecated; uint64_t m_nCurrentUniverse; }; @@ -1274,6 +1421,16 @@ struct VREvent_HDCPError_t EHDCPError eCode; }; +struct VREvent_AudioVolumeControl_t +{ + float fVolumeLevel; +}; + +struct VREvent_AudioMuteControl_t +{ + bool bMute; +}; + typedef union { VREvent_Reserved_t reserved; @@ -1305,7 +1462,9 @@ typedef union VREvent_ShowUI_t showUi; VREvent_ShowDevTools_t showDevTools; VREvent_HDCPError_t hdcpError; - /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ + VREvent_AudioVolumeControl_t audioVolumeControl; + VREvent_AudioMuteControl_t audioMuteControl; + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ } VREvent_Data_t; @@ -1587,6 +1746,7 @@ enum EVRNotificationError VRNotificationError_NotificationQueueFull = 101, VRNotificationError_InvalidOverlayHandle = 102, VRNotificationError_SystemWithUserValueAlreadyExists = 103, + VRNotificationError_ServiceUnavailable = 104, }; @@ -1705,6 +1865,8 @@ enum EVRInitError VRInitError_Init_VRDashboardTokenFailure = 165, VRInitError_Init_VRDashboardEnvironmentFailure = 166, VRInitError_Init_VRDashboardPathFailure = 167, + VRInitError_Init_InstallationTooOld = 168, + VRInitError_Init_ClientVersionAlreadyProvided = 169, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1833,6 +1995,11 @@ enum EVRInitError VRInitError_Compositor_SystemLayerCreateSession = 493, VRInitError_Compositor_CreateInverseDistortUVs = 494, VRInitError_Compositor_CreateBackbufferDepth = 495, + VRInitError_Compositor_CannotDRMLeaseDisplay = 496, + VRInitError_Compositor_CannotConnectToDisplayServer = 497, + VRInitError_Compositor_GnomeNoDRMLeasing = 498, + VRInitError_Compositor_FailedToInitializeEncoder = 499, + VRInitError_Compositor_CreateBlurTexture = 500, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1854,6 +2021,12 @@ enum EVRInitError VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115, + VRInitError_VendorSpecific_Oasis_UnlockRequired = 1150, + + VRInitError_VendorSpecific_VRLink_OutdatedDriverMESA = 1200, + VRInitError_VendorSpecific_VRLink_OutdatedDriverNVIDIA = 1201, + VRInitError_VendorSpecific_VRLink_NoVideoSupport = 1202, + VRInitError_Steam_SteamInstallationNotFound = 2000, // Strictly a placeholder @@ -1949,28 +2122,31 @@ 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, +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_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame -const uint32_t VRCompositor_PredictionMask = 0xF0; // 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 +const uint32_t VRCompositor_PredictionMask = 0xF0; // The runtime may predict more than one frame ahead if + // it detects the application is taking too long to render. These // 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 = 0xF00; // Number of frames the compositor is throttling the application. +const uint32_t VRCompositor_ThrottleMask = 0xF00; // 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 ) >> 8 ) +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( push, 4 ) +#endif /** Provides a single frame's timing information to the app */ struct Compositor_FrameTiming { @@ -2013,7 +2189,12 @@ struct Compositor_FrameTiming uint32_t m_nNumVSyncsReadyForUse; uint32_t m_nNumVSyncsToFirstView; + + float m_flTransferLatencyMs; }; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif /** Provides compositor benchmark results to the app */ struct Compositor_BenchmarkResults @@ -2070,6 +2251,22 @@ struct ImuSample_t uint32_t unOffScaleFlags; }; +enum class EVRDistortionChannel : uint32_t +{ + Red = 0, // given a coordinate in distorted panel space, returns the coordinate to sample in rectilinear render space for the red channel + Green, // given a coordinate in distorted panel space, returns the coordinate to sample in rectilinear render space for the green channel + Blue, // given a coordinate in distorted panel space, returns the coordinate to sample in rectilinear render space for the blue channel + InverseRed, // given a coordinate in rectilinear render space, returns the corresponding coordinate in distorted panel space for the red channel + InverseGreen, // given a coordinate in rectilinear render space, returns the corresponding coordinate in distorted panel space for the green channel + InverseBlue, // given a coordinate in rectilinear render space, returns the corresponding coordinate in distorted panel space for the blue channel + Count +}; + +struct DistortionCoordinate_t +{ + float u, v; // 0..1 +}; + #pragma pack( pop ) // figure out how to import from the VR API dll @@ -2156,6 +2353,12 @@ class IVRSystem * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + /** Gets the result of the distortion functions for the specified eye and set of input UVs. + * nNumCoordinates must be the number of elements of pInput and pOutput. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortionSet( EVREye eEye, EVRDistortionChannel eChannel, bool bAsNormalizedDeviceCoordinates, + uint32_t nNumCoordinates, const DistortionCoordinate_t *pInput, DistortionCoordinate_t *pOutput ) = 0; + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. * Normally View and Eye^-1 will be multiplied together and treated as View in your application. @@ -2327,6 +2530,15 @@ class IVRSystem uncbVREvent should be the size in bytes of the VREvent_t struct */ virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + /** Returns true and fills the event with the next event on the queue, including any of this user's overlay event queues, + * if there are any. If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct. + * If the event is targeted at a specific overlay, *pulOverlayHandle will be set to the handle, else k_ulOverlayHandleInvalid. + * This method is equivalent to calling both PollNextEventWithPose, and IVROverlay::PollNextOverlayEvent for every overlay you create, + * but is more efficient. You may pass NULL for pTrackedDevicePose if you don't care about poses. You must pass a valid pointer for + * pulOverlayHandle, because otherwise the target for some events (like ButtonPress) would be ambiguous even with one overlay. + * If you call this, you should not call PollNextEvent/WithPose(), since they all share the same read pointer. */ + virtual bool PollNextEventWithPoseAndOverlays( vr::ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, TrackedDevicePose_t *pTrackedDevicePose, VROverlayHandle_t *pulOverlayHandle ) = 0; + /** returns the name of an EVREvent enum value */ virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; @@ -2344,6 +2556,18 @@ class IVRSystem */ virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + /** Provides per-eye NDC foveation centers based on eye tracking, using the projection matrices accessible + * from IVRSystem::GetProjectionMatrix(...). Returns true if these NDC points are valid; false otherwise. + * This API will return false on systems that do not have an eye tracker, or may transiently return false if a + * system's eye tracker reports that eye tracking is invalid. + */ + virtual bool GetEyeTrackedFoveationCenter( HmdVector2_t *pNdcLeft, HmdVector2_t *pNdcRight ) = 0; + + /** A variant of GetEyeTrackedFoveationCenter(...), where the caller specifies the projection matrix to use. + * Use this if you need a foveation center for a projection matrix other than what is returned from IVRSystem::GetProjectionMatrix(...). + */ + virtual bool GetEyeTrackedFoveationCenterForProjection( const HmdMatrix44_t *pProjMat, HmdVector2_t *pNdc ) = 0; + // ------------------------------------ // Controller methods // ------------------------------------ @@ -2422,9 +2646,11 @@ class IVRSystem * presence information is provided by other APIs. */ virtual const char *GetRuntimeVersion() = 0; + /** Tells the SteamVR runtime which version of the SDK our client was compiled against. */ + virtual vr::EVRInitError SetSDKVersion( uint32_t nVersionMajor, uint32_t nVersionMinor, uint32_t nVersionBuild ) = 0; }; -static const char * const IVRSystem_Version = "IVRSystem_022"; +static const char * const IVRSystem_Version = "IVRSystem_026"; } @@ -2451,10 +2677,11 @@ namespace vr VRApplicationError_LaunchFailed = 109, // the process didn't start VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application - VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_OldApplicationQuitting = 112, // Caller should retry while PerformApplicationPrelaunchCheck is returing this VRApplicationError_TransitionAborted = 113, VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) VRApplicationError_SteamVRIsExiting = 115, + VRApplicationError_WaitingForChaperone = 116, // Caller should retry while PerformApplicationPrelaunchCheck is returing this VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data VRApplicationError_PropertyNotSet = 201, // The requested property was not set @@ -2481,6 +2708,7 @@ namespace vr VRApplicationProperty_Description_String = 50, VRApplicationProperty_NewsURL_String = 51, VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_ImagePathCapsule_String = 55, VRApplicationProperty_Source_String = 53, VRApplicationProperty_ActionManifestURL_String = 54, @@ -2617,6 +2845,7 @@ namespace vr * What the caller should do about these failures depends on the failure: * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit * and try again. + * VRApplicationError_WaitingForChaperone - Room setup is in progress. Wait for VREvent_ChaperoneRoomSetupCommitted and try again. * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. * VRApplicationError_None - Go ahead and launch. Everything is clear. @@ -2633,19 +2862,26 @@ namespace vr * the working directory. */ virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + /** Registers a new subprocess launched by the calling application. This + * suppresses all application transition UI and automatically identifies the new process + * as part of the same application. On success the calling process should exit immediately. */ + virtual EVRApplicationError RegisterSubprocess( uint32_t nPid ) = 0; + /** Returns the current scene process ID according to the application system. A scene process will get scene * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application * type. */ virtual uint32_t GetCurrentSceneProcessId() = 0; }; - static const char * const IVRApplications_Version = "IVRApplications_007"; + static const char * const IVRApplications_Version = "IVRApplications_008"; } // namespace vr // ivrsettings.h +#ifndef OPENVR_NO_STL #include +#endif namespace vr { @@ -2657,6 +2893,7 @@ namespace vr VRSettingsError_ReadFailed = 3, VRSettingsError_JsonParseFailed = 4, VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + VRSettingsError_AccessDenied = 6, }; // The maximum length of a settings key @@ -2717,10 +2954,12 @@ namespace vr { m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError ); } +#ifndef OPENVR_NO_STL void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr ) { m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError ); } +#endif bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) { @@ -2738,6 +2977,7 @@ namespace vr { m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError ); } +#ifndef OPENVR_NO_STL std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr ) { char buf[4096]; @@ -2750,6 +2990,7 @@ namespace vr else return ""; } +#endif void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) { @@ -2765,6 +3006,7 @@ namespace vr //----------------------------------------------------------------------------- // steamvr keys static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_Contrast_Float = "contrast"; static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; @@ -2782,6 +3024,7 @@ namespace vr static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; + static const char * const k_pch_SteamVR_StartColor_String = "startColor"; static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * const k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences"; static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; @@ -2794,10 +3037,17 @@ namespace vr static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + static const char * const k_pch_SteamVR_FoveatedSharpening_Bool = "sharpening"; + static const char * const k_pch_SteamVR_FoveatedSharpeningOverride_Int32 = "sharpeningOverride"; static const char * const k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle"; static const char * const k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict"; static const char * const k_pch_SteamVR_WorldScale_Float = "worldScale"; static const char * const k_pch_SteamVR_FovScale_Int32 = "fovScale"; + static const char * const k_pch_SteamVR_FovScaleInner_Int32 = "fovScaleInner"; + static const char * const k_pch_SteamVR_FovScaleUpper_Int32 = "fovScaleUpper"; + static const char * const k_pch_SteamVR_FovScaleLower_Int32 = "fovScaleLower"; + static const char * const k_pch_SteamVR_FovScaleFormat_Int32 = "fovScaleFormat"; + static const char * const k_pch_SteamVR_FovScaleLetterboxed_Bool = "fovScaleLetterboxed"; static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; @@ -2821,7 +3071,6 @@ namespace vr static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; - static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; @@ -2842,6 +3091,13 @@ namespace vr static const char * const k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility"; static const char * const k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode"; static const char * const k_pch_SteamVR_UsePrism_Bool = "usePrism"; + static const char * const k_pch_SteamVR_AllowFallbackMirrorWindowLinux_Bool = "allowFallbackMirrorWindowLinux"; + static const char * const k_pch_SteamVR_DisableKeyboardPrivacy_Bool = "disableKeyboardPrivacy"; + + //----------------------------------------------------------------------------- + // openxr keys + static const char * const k_pch_OpenXR_Section = "openxr"; + static const char * const k_pch_OpenXR_MetaUnityPluginCompatibility_Int32 = "metaUnityPluginCompatibility"; //----------------------------------------------------------------------------- // direct mode keys @@ -2892,6 +3148,8 @@ namespace vr static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + static const char * const k_pch_UserInterface_CheckStatusInterval_Int = "vrmStatusCheckInterval"; + static const char * const k_pch_UserInterface_CheckForSteam_Bool = "vrmCheckForSteam"; //----------------------------------------------------------------------------- // notification keys @@ -2979,6 +3237,7 @@ namespace vr static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; + static const char * const k_pch_Power_OverrideWindowsPowerScheme_Bool = "overrideWindowsPowerScheme"; //----------------------------------------------------------------------------- // dashboard keys @@ -2986,11 +3245,13 @@ namespace vr static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; static const char * const k_pch_Dashboard_Position = "position"; - static const char * const k_pch_Dashboard_DesktopScale = "desktopScale"; static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale"; static const char * const k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer"; - static const char * const k_pch_Dashboard_StickyDashboard = "stickyDashboard"; static const char * const k_pch_Dashboard_AllowSteamOverlays_Bool = "allowSteamOverlays"; + static const char * const k_pch_Dashboard_AllowVRGamepadUI_Bool = "allowVRGamepadUI"; + static const char * const k_pch_Dashboard_SteamMatchesHMDFramerate = "steamMatchesHMDFramerate"; + static const char * const k_pch_Dashboard_GrabHandleAcceleration = "grabHandleAcceleration"; + static const char * const k_pch_Dashboard_OverlayBacksideColor_String = "overlayBacksideColor"; //----------------------------------------------------------------------------- // model skin keys @@ -3001,6 +3262,8 @@ namespace vr static const char * const k_pch_Driver_Enable_Bool = "enable"; static const char * const k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; + static const char * const k_pch_Driver_Hmd_AllowsClientToControlTextureIndex_Bool = "hmdAllowsClientToControlTextureIndex"; + static const char * const k_pch_Driver_ForceSystemLayerUseAppPoses_Bool = "forceSystemLayerUseAppPoses"; //----------------------------------------------------------------------------- // web interface keys @@ -3041,7 +3304,10 @@ namespace vr // Last known keys for righting recovery static const char * const k_pch_LastKnown_Section = "LastKnown"; static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; - static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + static const char *const k_pch_LastKnown_HMDModel_String = "HMDModel"; + static const char* const k_pch_LastKnown_ActualHMDDriver_String = "ActualHMDDriver"; + static const char* const k_pch_LastKnown_HMDSerialNumber_String = "HMDSerialNumber"; + static const char* const k_pch_LastKnown_HMDRemoteClientID_String = "RemoteClientID"; // uint64 in string //----------------------------------------------------------------------------- // Dismissed warnings @@ -3058,6 +3324,10 @@ namespace vr // Log of GPU performance static const char * const k_pch_GpuSpeed_Section = "GpuSpeed"; + //----------------------------------------------------------------------------- + // OpenXR Render Model Extension keys + static const char *const k_pch_XRRenderModelCache_Section = "XRRenderModelUuidCache"; + } // namespace vr // ivrchaperone.h @@ -3102,12 +3372,16 @@ class IVRChaperone * Tracking space center (0,0,0) is the center of the Play Area. **/ virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; - /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). - * Corners are in counter-clockwise order. - * Standing center (0,0,0) is the center of the Play Area. - * It's a rectangle. - * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. - * Height of every corner is 0Y (on the floor). **/ + /** Returns a quad describing the Play Area (formerly named Soft Bounds). + * The corners form a rectangle. + * Corners are in counter-clockwise order, starting at the front-right. + * The positions are given relative to the standing origin. + * The center of the rectangle is the center of the user's calibrated play space, not necessarily the standing + * origin. + * The Play Area's forward direction goes from its center through the mid-point of a line drawn between the + * first and second corner. + * The quad lies on the XZ plane (height = 0y), with 2 sides parallel to the X-axis and two sides parallel + * to the Z-axis of the user's calibrated Play Area. **/ virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; /** Reload Chaperone data from the .vrchap file on disk. */ @@ -3208,7 +3482,7 @@ class IVRChaperoneSetup virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; /** Sets the Collision Bounds in the working copy. */ - virtual void SetWorkingPerimeter( VR_ARRAY_COUNT( unPointCount ) HmdVector2_t *pPointBuffer, uint32_t unPointCount ) = 0; + virtual void SetWorkingPerimeter( VR_ARRAY_COUNT( unPointCount ) const HmdVector2_t *pPointBuffer, uint32_t unPointCount ) = 0; /** Sets the preferred seated position in the working copy. */ virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; @@ -3267,6 +3541,14 @@ enum EVRCompositorError VRCompositorError_AlreadySet = 110, }; +/** Usage types for retreiving shared textures */ +enum EVRCompositorTextureUsage +{ + VRCompositorTextureUsage_Left = Eye_Left, + VRCompositorTextureUsage_Right = Eye_Right, + VRCompositorTextureUsage_Both, +}; + /** Timing mode passed to SetExplicitTimingMode(); see that function for documentation */ enum EVRCompositorTimingMode { @@ -3393,6 +3675,10 @@ class IVRCompositor * It is okay to pass NULL for either pose if you only want one of the values. */ virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + /** Get the shared texture to copy into for submitting frames. */ + virtual EVRCompositorError GetSubmitTexture( Texture_t *pOutTexture, bool *pNeedsFlush, EVRCompositorTextureUsage eUsage, + const Texture_t *pTexture, const VRTextureBounds_t *pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. * @@ -3409,6 +3695,8 @@ class IVRCompositor * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) */ virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + virtual EVRCompositorError SubmitWithArrayIndex( EVREye eEye, const Texture_t *pTexture, uint32_t unTextureArrayIndex, + const VRTextureBounds_t *pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; /** Clears the frame that was sent with the last call to Submit. This will cause the * compositor to show the grid until Submit is called again. */ @@ -3588,7 +3876,7 @@ class IVRCompositor virtual EVRCompositorError GetPosesForFrame( uint32_t unPosePredictionID, VR_ARRAY_COUNT( unPoseArrayCount ) TrackedDevicePose_t* pPoseArray, uint32_t unPoseArrayCount ) = 0; }; -static const char * const IVRCompositor_Version = "IVRCompositor_027"; +static const char * const IVRCompositor_Version = "IVRCompositor_029"; } // namespace vr @@ -3842,8 +4130,34 @@ namespace vr // If this is set, the alpha values of the overlay texture will be ignored VROverlayFlags_IgnoreTextureAlpha = 1 << 22, - // Do not use - VROverlayFlags_Reserved = 1 << 26, + // If this is set, this overlay will have a control bar drawn underneath of it in the dashboard. + VROverlayFlags_EnableControlBar = 1 << 23, // DEPRECATED + + // If this is set, the overlay control bar will provide a button to toggle the keyboard. + VROverlayFlags_EnableControlBarKeyboard = 1 << 24, + + // If this is set, the overlay control bar will provide a "close" button which will send a + // VREvent_OverlayClosed event to the overlay when pressed. Applications that use this flag are responsible + // for responding to the event with something that approximates "closing" behavior, such as destroying their + // overlay and/or shutting down their application. + VROverlayFlags_EnableControlBarClose = 1 << 25, + + // When set, use a minimal control bar on the overlay. This is the successor to VROverlayFlags_EnableControlBar + VROverlayFlags_MinimalControlBar = 1 << 26, + + // If this is set, click stabilization will be applied to the laser interaction so that clicks more reliably + // trigger on the user's intended target + VROverlayFlags_EnableClickStabilization = 1 << 27, + + // If this is set, laser mouse pointer events may be sent for the secondary laser. These events will have + // cursorIndex set to 0 for the primary laser and 1 for the secondary. + VROverlayFlags_MultiCursor = 1 << 28, + + // If this is set, the compositor won't draw any stylized backing when viewing the overlay from behind. + // NOTE: Overlays will only have a backside in the first place if build with OpenVR SDK 2.15.x and higher. + // NOTE: DashboardOverlays ignore this flag and the SDK version; they always have a backside unless the user + // globally disables that. + VROverlayFlags_NoBackside = 1 << 29, }; enum VRMessageOverlayResponse @@ -3923,8 +4237,16 @@ namespace vr enum EKeyboardFlags { - KeyboardFlag_Minimal = 1 << 0, // makes the keyboard send key events immediately instead of accumulating a buffer - KeyboardFlag_Modal = 2 << 0, // makes the keyboard take all focus and dismiss when clicking off the panel + /** Makes the keyboard send key events immediately instead of accumulating a buffer */ + KeyboardFlag_Minimal = 1 << 0, + /** Makes the keyboard take all focus and dismiss when clicking off the panel */ + KeyboardFlag_Modal = 1 << 1, + /** Shows arrow keys on the keyboard when in minimal mode. Buffered (non-minimal) mode always has them. In minimal + * mode, when arrow keys are pressed, they send ANSI escape sequences (e.g. "\x1b[D" for left arrow). */ + KeyboardFlag_ShowArrowKeys = 1 << 2, + /** Shows the hide keyboard button instead of a Done button. The Done key sends a VREvent_KeyboardDone when + * clicked. Hide only sends the Closed event. */ + KeyboardFlag_HideDoneKey = 1 << 3, }; /** Defines the project used in an overlay that is using SetOverlayTransformProjection */ @@ -3951,6 +4273,10 @@ namespace vr /** Creates a new named overlay. All overlays start hidden and with default settings. */ virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + /** Creates a Subview Overlay, which is a separate image that gets composited onto an existing parent overlay based on a 2D transform. + * Subview overlays may only be created for parent overlays of the same process. */ + virtual EVROverlayError CreateSubviewOverlay( VROverlayHandle_t parentOverlayHandle, const char *pchSubviewOverlayKey, const char *pchSubviewOverlayName, VROverlayHandle_t *pSubviewOverlayHandle ) = 0; + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are * automatically destroyed. */ virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; @@ -4095,13 +4421,16 @@ namespace vr ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t* pmatTrackingOriginToOverlayTransform, const VROverlayProjection_t *pProjection, vr::EVREye eEye ) = 0; - /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + /** Positions a subview overlay to a position within the parent overlay, from the top-left corners of each overlay, in the pixel coordinate space of the parent standalone overlay. */ + virtual EVROverlayError SetSubviewPosition( VROverlayHandle_t ulOverlayHandle, float fX, float fY ) = 0; + + /** Shows the VR overlay. Not applicable for Dashboard Overlays. */ virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; - /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + /** Hides the VR overlay. Not applicable for Dashboard Overlays. */ virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; - /** Returns true if the overlay is visible. */ + /** Returns true if the overlay is currently visible, applicable for all overlay types except Dashboard Thumbnail overlays. VREvent_OverlayShown and VREvent_OverlayHidden reflect changes to this value. */ virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ @@ -4223,7 +4552,7 @@ namespace vr /** Shows the dashboard. */ virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; - /** Returns the tracked device that has the laser pointer in the dashboard */ + /** Returns the tracked device index that has the laser pointer in the dashboard, or the last one that was used. */ virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; // --------------------------------------------- @@ -4264,7 +4593,7 @@ namespace vr virtual void CloseMessageOverlay() = 0; }; - static const char * const IVROverlay_Version = "IVROverlay_027"; + static const char * const IVROverlay_Version = "IVROverlay_028"; } // namespace vr @@ -4351,11 +4680,14 @@ namespace vr namespace vr { -static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility -static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. -static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') -static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb -static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // OpenVR: For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_OpenXR_Aim= "openxr_aim"; // OpenXR: For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // OpenVR: Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_OpenXR_Grip = "openxr_grip"; // OpenXR: Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_OpenXR_HandModel = "openxr_handmodel"; // OpenXR: Pose that can be used to place hand models & visuals that aren't reliant on the physical shape of a controller +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping #pragma pack( push, 8 ) @@ -4587,6 +4919,12 @@ namespace vr class IVRTrackedCamera { public: + + // ------------------------------------ + // IVRTrackedCamera is used by client applications to poll for camera frames, when available. + // This API has no relevance to driver writers adding camera support to a particular HMD. + // ------------------------------------ + /** Returns a string for an error */ virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; @@ -5060,6 +5398,14 @@ namespace vr /** Sets the dominant hand for the user for this application. */ virtual EVRInputError SetDominantHand( ETrackedControllerRole eDominantHand ) = 0; + /** Reads the state of an eye tracking action given its handle for the number of seconds relative to now. + * This will generally be called with negative times from the fUpdateTime fields in other actions. */ + virtual EVRInputError GetEyeTrackingDataRelativeToNow( VRActionHandle_t action, vr::ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, vr::VREyeTrackingData_t *pEyeTrackingData, uint32_t ulEyeTrackingDataSize ) = 0; + + /** Reads the state of an eye tracking action given its handle. The returned data will be for the frame + * predicted by last call to IVRCompositor::WaitGetPoses(). */ + virtual EVRInputError GetEyeTrackingDataForNextFrame( VRActionHandle_t action, vr::ETrackingUniverseOrigin eOrigin, vr::VREyeTrackingData_t *pEyeTrackingData, uint32_t ulEyeTrackingDataSize ) = 0; + // --------------- Static Skeletal Data ------------------- // /** Reads the number of bones in skeleton associated with the given action */ @@ -5111,7 +5457,7 @@ namespace vr 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; + virtual EVRInputError GetActionBindingInfo( VRActionHandle_t action, VR_ARRAY_COUNT( unBindingInfoCount ) 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; @@ -5142,7 +5488,7 @@ namespace vr }; - static const char * const IVRInput_Version = "IVRInput_010"; + static const char * const IVRInput_Version = "IVRInput_011"; } // namespace vr @@ -5197,7 +5543,7 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0; virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0; }; - static const char *IVRIOBuffer_Version = "IVRIOBuffer_002"; + static const char * const IVRIOBuffer_Version = "IVRIOBuffer_002"; } // ivrspatialanchors.h @@ -5296,6 +5642,83 @@ namespace vr static const char * const IVRDebug_Version = "IVRDebug_001"; } // namespace vr + +// ivripcresourcemanagerclient.h + +namespace vr +{ + +// ----------------------------------------------------------------------------- +// Purpose: Interact with the IPCResourceManager +// ----------------------------------------------------------------------------- +class IVRIPCResourceManagerClient +{ +public: + /** Create a new tracked Vulkan Image + * + * nImageFormat: in VkFormat + */ + virtual bool NewSharedVulkanImage( uint32_t nImageFormat, uint32_t nWidth, uint32_t nHeight, bool bRenderable, bool bMappable, bool bComputeAccess, uint32_t unMipLevels, uint32_t unArrayLayerCount, uint32_t unAdditionalVkCreateFlags, uint32_t unAdditionalVkUsageFlags, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Create a new tracked Vulkan Buffer */ + virtual bool NewSharedVulkanBuffer( uint32_t nSize, uint32_t nUsageFlags, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Create a new tracked Vulkan Semaphore */ + virtual bool NewSharedVulkanSemaphore( bool bCounting, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Grab a reference to hSharedHandle, and optionally generate a new IPC handle if pNewIpcHandle is not nullptr */ + virtual bool RefResource( vr::SharedTextureHandle_t hSharedHandle, uint64_t *pNewIpcHandle ) = 0; + + /** Drop a reference to hSharedHandle */ + virtual bool UnrefResource( vr::SharedTextureHandle_t hSharedHandle ) = 0; + + /* Get all the DRM formats we support using DMA-BUF images for. + * + * pOutFormatCount and pOutFormats function like Vulkan: + * - If pOutFormats is NULL, then pOutFormatCount will be overwritten with the format count. + * - If pOutFormats is not NULL, then pOutFormatCount specifies the size of the pOutFormats array, + * and will be overwritten with the number of formats written to the array. + * + * If the function fails, false is returned, and pOutFormatCount will be 0. + * Supported on Linux only. + */ + virtual bool GetDmabufFormats( uint32_t *pOutFormatCount, uint32_t *pOutFormats ) = 0; + + /** Get dmabuf modifiers we are allowed to use. + * + * pOutModifierCount and pOutModifiers function like Vulkan: + * - If pOutModifiers is NULL, then pOutModifierCount will be overwritten with the modifier count. + * - If pOutModifiers is not NULL, then pOutModifierCount specifies the size of the pOutModifiers array, + * and will be overwritten with the number of modifiers written to the array. + * + * If modifiers are not supported, a single DRM_FORMAT_MOD_INVALID entry will be returned. + * + * If the function fails, false is returned, and pOutModifierCount will be 0. + * Supported on Linux only. + */ + virtual bool GetDmabufModifiers( vr::EVRApplicationType eApplicationType, uint32_t unDRMFormat, uint32_t *pOutModifierCount, uint64_t *pOutModifiers ) = 0; + + /** Import a dmabuf directly. + * Note: the FD you pass in will be dup'ed, so you must close it yourself. + * This function does NOT take ownership of the fd you pass in. + * Supported on Linux only. + */ + virtual bool ImportDmabuf( vr::EVRApplicationType eApplicationType, vr::DmabufAttributes_t *pDmabufAttributes, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Consumes an IPC handle (eg. from RefResource) and returns a file-descriptor. + * Caller acquires ownership of fd and is responsible for closing it. + * Supported on Linux only. + */ + virtual bool ReceiveSharedFd( uint64_t ulIpcHandle, int *pOutFd ) = 0; + +protected: + /** Non-deletable */ + virtual ~IVRIPCResourceManagerClient() {}; +}; + +static const char *IVRIPCResourceManagerClient_Version = "IVRIPCResourceManagerClient_003"; + +} // End #endif // _OPENVR_API @@ -5608,6 +6031,17 @@ namespace vr } return m_pVRNotifications; } + + IVRIPCResourceManagerClient *VRIPCResourceManager() + { + CheckClear(); + if ( !m_pVRIPCResourceManagerClient ) + { + EVRInitError eError; + m_pVRIPCResourceManagerClient = ( IVRIPCResourceManagerClient * )VR_GetGenericInterface( IVRIPCResourceManagerClient_Version, &eError ); + } + return m_pVRIPCResourceManagerClient; + } private: IVRSystem *m_pVRSystem; @@ -5630,6 +6064,7 @@ namespace vr IVRSpatialAnchors *m_pVRSpatialAnchors; IVRDebug *m_pVRDebug; IVRNotifications *m_pVRNotifications; + IVRIPCResourceManagerClient *m_pVRIPCResourceManagerClient; }; inline COpenVRContext &OpenVRInternal_ModuleContext() @@ -5658,6 +6093,7 @@ namespace vr 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 IVRIPCResourceManagerClient *VR_CALLTYPE VRIPCResourceManager() { return OpenVRInternal_ModuleContext().VRIPCResourceManager(); } inline void COpenVRContext::Clear() { @@ -5681,6 +6117,7 @@ namespace vr m_pVRSpatialAnchors = nullptr; m_pVRNotifications = nullptr; m_pVRDebug = nullptr; + m_pVRIPCResourceManagerClient = nullptr; } VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); @@ -5696,17 +6133,21 @@ namespace vr COpenVRContext &ctx = OpenVRInternal_ModuleContext(); ctx.Clear(); + if ( eError == VRInitError_None && !VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + eError = VRInitError_Init_InterfaceNotFound; + } + if ( eError == VRInitError_None ) { - if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) - { - pVRSystem = VRSystem(); - } - else - { - VR_ShutdownInternal(); - eError = VRInitError_Init_InterfaceNotFound; - } + pVRSystem = VRSystem(); + eError = pVRSystem->SetSDKVersion( k_nSteamVRVersionMajor, k_nSteamVRVersionMinor, k_nSteamVRVersionBuild ); + } + + if ( eError != VRInitError_None ) + { + pVRSystem = nullptr; + VR_ShutdownInternal(); } if ( peError ) diff --git a/third-party/openvr/headers/openvr_api.cs b/third-party/openvr/headers/openvr_api.cs index a5794715..30507612 100644 --- a/third-party/openvr/headers/openvr_api.cs +++ b/third-party/openvr/headers/openvr_api.cs @@ -36,16 +36,24 @@ public struct IVRSystem internal _GetProjectionRaw GetProjectionRaw; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ComputeDistortion(EVREye eEye, float fU, float fV, ref DistortionCoordinates_t pDistortionCoordinates); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ComputeDistortion ComputeDistortion; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _ComputeDistortionSet(EVREye eEye, EVRDistortionChannel eChannel, [MarshalAs(UnmanagedType.I1)] bool bAsNormalizedDeviceCoordinates, uint nNumCoordinates, ref DistortionCoordinate_t pInput, ref DistortionCoordinate_t pOutput); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ComputeDistortionSet ComputeDistortionSet; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate HmdMatrix34_t _GetEyeToHeadTransform(EVREye eEye); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetEyeToHeadTransform GetEyeToHeadTransform; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync, ref ulong pulFrameCounter); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetTimeSinceLastVsync GetTimeSinceLastVsync; @@ -66,12 +74,14 @@ public struct IVRSystem internal _GetOutputDevice GetOutputDevice; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsDisplayOnDesktop(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsDisplayOnDesktop IsDisplayOnDesktop; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate bool _SetDisplayVisibility(bool bIsVisibleOnDesktop); + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _SetDisplayVisibility([MarshalAs(UnmanagedType.I1)] bool bIsVisibleOnDesktop); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetDisplayVisibility SetDisplayVisibility; @@ -121,11 +131,13 @@ public struct IVRSystem internal _GetTrackedDeviceClass GetTrackedDeviceClass; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsTrackedDeviceConnected(uint unDeviceIndex); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsTrackedDeviceConnected IsTrackedDeviceConnected; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetBoolTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetBoolTrackedDeviceProperty GetBoolTrackedDeviceProperty; @@ -166,15 +178,23 @@ public struct IVRSystem internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _PollNextEvent(ref VREvent_t pEvent, uint uncbVREvent); [MarshalAs(UnmanagedType.FunctionPtr)] internal _PollNextEvent PollNextEvent; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _PollNextEventWithPose(ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose); [MarshalAs(UnmanagedType.FunctionPtr)] internal _PollNextEventWithPose PollNextEventWithPose; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _PollNextEventWithPoseAndOverlays(ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose, ref ulong pulOverlayHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _PollNextEventWithPoseAndOverlays PollNextEventWithPoseAndOverlays; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate IntPtr _GetEventTypeNameFromEnum(EVREventType eType); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -186,11 +206,25 @@ public struct IVRSystem internal _GetHiddenAreaMesh GetHiddenAreaMesh; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _GetEyeTrackedFoveationCenter(ref HmdVector2_t pNdcLeft, ref HmdVector2_t pNdcRight); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetEyeTrackedFoveationCenter GetEyeTrackedFoveationCenter; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _GetEyeTrackedFoveationCenterForProjection(ref HmdMatrix44_t pProjMat, ref HmdVector2_t pNdc); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetEyeTrackedFoveationCenterForProjection GetEyeTrackedFoveationCenterForProjection; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetControllerState GetControllerState; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize, ref TrackedDevicePose_t pTrackedDevicePose); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetControllerStateWithPose GetControllerStateWithPose; @@ -211,21 +245,25 @@ public struct IVRSystem internal _GetControllerAxisTypeNameFromEnum GetControllerAxisTypeNameFromEnum; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsInputAvailable(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsInputAvailable IsInputAvailable; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsSteamVRDrawingControllers(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsSteamVRDrawingControllers IsSteamVRDrawingControllers; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ShouldApplicationPause(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ShouldApplicationPause ShouldApplicationPause; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ShouldApplicationReduceRenderingWork(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ShouldApplicationReduceRenderingWork ShouldApplicationReduceRenderingWork; @@ -250,6 +288,11 @@ public struct IVRSystem [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetRuntimeVersion GetRuntimeVersion; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInitError _SetSDKVersion(uint nVersionMajor, uint nVersionMinor, uint nVersionBuild); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetSDKVersion SetSDKVersion; + } [StructLayout(LayoutKind.Sequential)] @@ -281,7 +324,7 @@ public struct IVRTrackedCamera internal _GetCameraErrorNameFromEnum GetCameraErrorNameFromEnum; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, ref bool pHasCamera); + internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, [MarshalAs(UnmanagedType.I1)] ref bool pHasCamera); [MarshalAs(UnmanagedType.FunctionPtr)] internal _HasCamera HasCamera; @@ -351,7 +394,7 @@ public struct IVRTrackedCamera public struct IVRApplications { [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _AddApplicationManifest(IntPtr pchApplicationManifestFullPath, bool bTemporary); + internal delegate EVRApplicationError _AddApplicationManifest(IntPtr pchApplicationManifestFullPath, [MarshalAs(UnmanagedType.I1)] bool bTemporary); [MarshalAs(UnmanagedType.FunctionPtr)] internal _AddApplicationManifest AddApplicationManifest; @@ -361,6 +404,7 @@ public struct IVRApplications internal _RemoveApplicationManifest RemoveApplicationManifest; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsApplicationInstalled(IntPtr pchAppKey); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsApplicationInstalled IsApplicationInstalled; @@ -401,6 +445,7 @@ public struct IVRApplications internal _LaunchDashboardOverlay LaunchDashboardOverlay; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _CancelApplicationLaunch(IntPtr pchAppKey); [MarshalAs(UnmanagedType.FunctionPtr)] internal _CancelApplicationLaunch CancelApplicationLaunch; @@ -426,6 +471,7 @@ public struct IVRApplications internal _GetApplicationPropertyString GetApplicationPropertyString; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetApplicationPropertyBool(IntPtr pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetApplicationPropertyBool GetApplicationPropertyBool; @@ -436,11 +482,12 @@ public struct IVRApplications internal _GetApplicationPropertyUint64 GetApplicationPropertyUint64; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRApplicationError _SetApplicationAutoLaunch(IntPtr pchAppKey, bool bAutoLaunch); + internal delegate EVRApplicationError _SetApplicationAutoLaunch(IntPtr pchAppKey, [MarshalAs(UnmanagedType.I1)] bool bAutoLaunch); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetApplicationAutoLaunch SetApplicationAutoLaunch; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetApplicationAutoLaunch(IntPtr pchAppKey); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetApplicationAutoLaunch GetApplicationAutoLaunch; @@ -451,11 +498,13 @@ public struct IVRApplications internal _SetDefaultApplicationForMimeType SetDefaultApplicationForMimeType; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetDefaultApplicationForMimeType(IntPtr pchMimeType, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetDefaultApplicationForMimeType GetDefaultApplicationForMimeType; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetApplicationSupportedMimeTypes(IntPtr pchAppKey, System.Text.StringBuilder pchMimeTypesBuffer, uint unMimeTypesBuffer); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetApplicationSupportedMimeTypes GetApplicationSupportedMimeTypes; @@ -495,6 +544,11 @@ public struct IVRApplications [MarshalAs(UnmanagedType.FunctionPtr)] internal _LaunchInternalProcess LaunchInternalProcess; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRApplicationError _RegisterSubprocess(uint nPid); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _RegisterSubprocess RegisterSubprocess; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate uint _GetCurrentSceneProcessId(); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -511,11 +565,13 @@ public struct IVRChaperone internal _GetCalibrationState GetCalibrationState; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetPlayAreaSize(ref float pSizeX, ref float pSizeZ); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetPlayAreaSize GetPlayAreaSize; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetPlayAreaRect(ref HmdQuad_t rect); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetPlayAreaRect GetPlayAreaRect; @@ -536,12 +592,13 @@ public struct IVRChaperone internal _GetBoundsColor GetBoundsColor; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _AreBoundsVisible(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _AreBoundsVisible AreBoundsVisible; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ForceBoundsVisible(bool bForce); + internal delegate void _ForceBoundsVisible([MarshalAs(UnmanagedType.I1)] bool bForce); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ForceBoundsVisible ForceBoundsVisible; @@ -556,6 +613,7 @@ public struct IVRChaperone public struct IVRChaperoneSetup { [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _CommitWorkingCopy(EChaperoneConfigFile configFile); [MarshalAs(UnmanagedType.FunctionPtr)] internal _CommitWorkingCopy CommitWorkingCopy; @@ -566,31 +624,37 @@ public struct IVRChaperoneSetup internal _RevertWorkingCopy RevertWorkingCopy; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetWorkingPlayAreaSize(ref float pSizeX, ref float pSizeZ); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetWorkingPlayAreaSize GetWorkingPlayAreaSize; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetWorkingPlayAreaRect(ref HmdQuad_t rect); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetWorkingPlayAreaRect GetWorkingPlayAreaRect; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetWorkingCollisionBoundsInfo GetWorkingCollisionBoundsInfo; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetLiveCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetLiveCollisionBoundsInfo GetLiveCollisionBoundsInfo; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetWorkingSeatedZeroPoseToRawTrackingPose GetWorkingSeatedZeroPoseToRawTrackingPose; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetWorkingStandingZeroPoseToRawTrackingPose GetWorkingStandingZeroPoseToRawTrackingPose; @@ -626,16 +690,19 @@ public struct IVRChaperoneSetup internal _ReloadFromDisk ReloadFromDisk; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetLiveSeatedZeroPoseToRawTrackingPose GetLiveSeatedZeroPoseToRawTrackingPose; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ExportLiveToBuffer(System.Text.StringBuilder pBuffer, ref uint pnBufferLength); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ExportLiveToBuffer ExportLiveToBuffer; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ImportFromBufferToWorking(IntPtr pBuffer, uint nImportFlags); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ImportFromBufferToWorking ImportFromBufferToWorking; @@ -685,11 +752,21 @@ public struct IVRCompositor [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetLastPoseForTrackedDeviceIndex GetLastPoseForTrackedDeviceIndex; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRCompositorError _GetSubmitTexture(ref Texture_t pOutTexture, [MarshalAs(UnmanagedType.I1)] ref bool pNeedsFlush, EVRCompositorTextureUsage eUsage, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetSubmitTexture GetSubmitTexture; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRCompositorError _Submit(EVREye eEye, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags); [MarshalAs(UnmanagedType.FunctionPtr)] internal _Submit Submit; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRCompositorError _SubmitWithArrayIndex(EVREye eEye, ref Texture_t pTexture, uint unTextureArrayIndex, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SubmitWithArrayIndex SubmitWithArrayIndex; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate void _ClearLastSubmittedFrame(); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -701,6 +778,7 @@ public struct IVRCompositor internal _PostPresentHandoff PostPresentHandoff; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetFrameTiming(ref Compositor_FrameTiming pTiming, uint unFramesAgo); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetFrameTiming GetFrameTiming; @@ -721,17 +799,17 @@ public struct IVRCompositor internal _GetCumulativeStats GetCumulativeStats; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); + internal delegate void _FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, [MarshalAs(UnmanagedType.I1)] bool bBackground); [MarshalAs(UnmanagedType.FunctionPtr)] internal _FadeToColor FadeToColor; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate HmdColor_t _GetCurrentFadeColor(bool bBackground); + internal delegate HmdColor_t _GetCurrentFadeColor([MarshalAs(UnmanagedType.I1)] bool bBackground); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetCurrentFadeColor GetCurrentFadeColor; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _FadeGrid(float fSeconds, bool bFadeGridIn); + internal delegate void _FadeGrid(float fSeconds, [MarshalAs(UnmanagedType.I1)] bool bFadeGridIn); [MarshalAs(UnmanagedType.FunctionPtr)] internal _FadeGrid FadeGrid; @@ -766,6 +844,7 @@ public struct IVRCompositor internal _CompositorQuit CompositorQuit; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsFullscreen(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsFullscreen IsFullscreen; @@ -781,6 +860,7 @@ public struct IVRCompositor internal _GetLastFrameRenderer GetLastFrameRenderer; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _CanRenderScene(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _CanRenderScene CanRenderScene; @@ -796,6 +876,7 @@ public struct IVRCompositor internal _HideMirrorWindow HideMirrorWindow; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsMirrorWindowVisible(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsMirrorWindowVisible IsMirrorWindowVisible; @@ -806,12 +887,13 @@ public struct IVRCompositor internal _CompositorDumpImages CompositorDumpImages; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ShouldAppRenderWithLowResources(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ShouldAppRenderWithLowResources ShouldAppRenderWithLowResources; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _ForceInterleavedReprojectionOn(bool bOverride); + internal delegate void _ForceInterleavedReprojectionOn([MarshalAs(UnmanagedType.I1)] bool bOverride); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ForceInterleavedReprojectionOn ForceInterleavedReprojectionOn; @@ -821,7 +903,7 @@ public struct IVRCompositor internal _ForceReconnectProcess ForceReconnectProcess; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SuspendRendering(bool bSuspend); + internal delegate void _SuspendRendering([MarshalAs(UnmanagedType.I1)] bool bSuspend); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SuspendRendering SuspendRendering; @@ -841,6 +923,7 @@ public struct IVRCompositor internal _GetMirrorTextureGL GetMirrorTextureGL; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ReleaseSharedGLTexture(uint glTextureId, IntPtr glSharedTextureHandle); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ReleaseSharedGLTexture ReleaseSharedGLTexture; @@ -876,16 +959,19 @@ public struct IVRCompositor internal _SubmitExplicitTimingData SubmitExplicitTimingData; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsMotionSmoothingEnabled(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsMotionSmoothingEnabled IsMotionSmoothingEnabled; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsMotionSmoothingSupported(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsMotionSmoothingSupported IsMotionSmoothingSupported; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsCurrentSceneFocusAppLoading(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsCurrentSceneFocusAppLoading IsCurrentSceneFocusAppLoading; @@ -901,6 +987,7 @@ public struct IVRCompositor internal _ClearStageOverride ClearStageOverride; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetCompositorBenchmarkResults(ref Compositor_BenchmarkResults pBenchmarkResults, uint nSizeOfBenchmarkResults); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetCompositorBenchmarkResults GetCompositorBenchmarkResults; @@ -930,6 +1017,11 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _CreateOverlay CreateOverlay; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _CreateSubviewOverlay(ulong parentOverlayHandle, IntPtr pchSubviewOverlayKey, IntPtr pchSubviewOverlayName, ref ulong pSubviewOverlayHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _CreateSubviewOverlay CreateSubviewOverlay; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _DestroyOverlay(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -971,12 +1063,12 @@ public struct IVROverlay internal _GetOverlayRenderingPid GetOverlayRenderingPid; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _SetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); + internal delegate EVROverlayError _SetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, [MarshalAs(UnmanagedType.I1)] bool bEnabled); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetOverlayFlag SetOverlayFlag; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVROverlayError _GetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, ref bool pbEnabled); + internal delegate EVROverlayError _GetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, [MarshalAs(UnmanagedType.I1)] ref bool pbEnabled); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetOverlayFlag GetOverlayFlag; @@ -1125,6 +1217,11 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetOverlayTransformProjection SetOverlayTransformProjection; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _SetSubviewPosition(ulong ulOverlayHandle, float fX, float fY); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetSubviewPosition SetSubviewPosition; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1136,6 +1233,7 @@ public struct IVROverlay internal _HideOverlay HideOverlay; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsOverlayVisible(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsOverlayVisible IsOverlayVisible; @@ -1151,6 +1249,7 @@ public struct IVROverlay internal _WaitFrameSync WaitFrameSync; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent); [MarshalAs(UnmanagedType.FunctionPtr)] internal _PollNextOverlayEvent PollNextOverlayEvent; @@ -1176,11 +1275,13 @@ public struct IVROverlay internal _SetOverlayMouseScale SetOverlayMouseScale; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _ComputeOverlayIntersection(ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults); [MarshalAs(UnmanagedType.FunctionPtr)] internal _ComputeOverlayIntersection ComputeOverlayIntersection; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsHoverTargetOverlay(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsHoverTargetOverlay IsHoverTargetOverlay; @@ -1251,11 +1352,13 @@ public struct IVROverlay internal _CreateDashboardOverlay CreateDashboardOverlay; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsDashboardVisible(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsDashboardVisible IsDashboardVisible; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsActiveDashboardOverlay(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsActiveDashboardOverlay IsActiveDashboardOverlay; @@ -1341,6 +1444,7 @@ public struct IVROverlayView internal _PostOverlayEvent PostOverlayEvent; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsViewingPermitted(ulong ulOverlayHandle); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsViewingPermitted IsViewingPermitted; @@ -1371,11 +1475,12 @@ public struct IVRHeadsetView internal _GetHeadsetViewMode GetHeadsetViewMode; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetHeadsetViewCropped(bool bCropped); + internal delegate void _SetHeadsetViewCropped([MarshalAs(UnmanagedType.I1)] bool bCropped); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetHeadsetViewCropped SetHeadsetViewCropped; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetHeadsetViewCropped(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetHeadsetViewCropped GetHeadsetViewCropped; @@ -1466,16 +1571,19 @@ public struct IVRRenderModels internal _GetComponentRenderModelName GetComponentRenderModelName; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetComponentStateForDevicePath(IntPtr pchRenderModelName, IntPtr pchComponentName, ulong devicePath, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetComponentStateForDevicePath GetComponentStateForDevicePath; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetComponentState(IntPtr pchRenderModelName, IntPtr pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetComponentState GetComponentState; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _RenderModelHasComponent(IntPtr pchRenderModelName, IntPtr pchComponentName); [MarshalAs(UnmanagedType.FunctionPtr)] internal _RenderModelHasComponent RenderModelHasComponent; @@ -1521,7 +1629,7 @@ public struct IVRSettings internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetBool(IntPtr pchSection, IntPtr pchSettingsKey, bool bValue, ref EVRSettingsError peError); + internal delegate void _SetBool(IntPtr pchSection, IntPtr pchSettingsKey, [MarshalAs(UnmanagedType.I1)] bool bValue, ref EVRSettingsError peError); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetBool SetBool; @@ -1541,6 +1649,7 @@ public struct IVRSettings internal _SetString SetString; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _GetBool(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetBool GetBool; @@ -1646,6 +1755,7 @@ public struct IVRDriverManager internal _GetDriverHandle GetDriverHandle; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsEnabled(uint nDriver); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsEnabled IsEnabled; @@ -1715,6 +1825,16 @@ public struct IVRInput [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetDominantHand SetDominantHand; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetEyeTrackingDataRelativeToNow(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref VREyeTrackingData_t pEyeTrackingData, uint ulEyeTrackingDataSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetEyeTrackingDataRelativeToNow GetEyeTrackingDataRelativeToNow; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVRInputError _GetEyeTrackingDataForNextFrame(ulong action, ETrackingUniverseOrigin eOrigin, ref VREyeTrackingData_t pEyeTrackingData, uint ulEyeTrackingDataSize); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetEyeTrackingDataForNextFrame GetEyeTrackingDataForNextFrame; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVRInputError _GetBoneCount(ulong action, ref uint pBoneCount); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -1781,7 +1901,7 @@ public struct IVRInput internal _GetOriginTrackedDeviceInfo GetOriginTrackedDeviceInfo; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRInputError _GetActionBindingInfo(ulong action, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref uint punReturnedBindingInfoCount); + internal delegate EVRInputError _GetActionBindingInfo(ulong action, [In, Out] InputBindingInfo_t[] pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref uint punReturnedBindingInfoCount); [MarshalAs(UnmanagedType.FunctionPtr)] internal _GetActionBindingInfo GetActionBindingInfo; @@ -1801,12 +1921,13 @@ public struct IVRInput internal _GetComponentStateForBinding GetComponentStateForBinding; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _IsUsingLegacyInput(); [MarshalAs(UnmanagedType.FunctionPtr)] internal _IsUsingLegacyInput IsUsingLegacyInput; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EVRInputError _OpenBindingUI(IntPtr pchAppKey, ulong ulActionSetHandle, ulong ulDeviceHandle, bool bShowOnDesktop); + internal delegate EVRInputError _OpenBindingUI(IntPtr pchAppKey, ulong ulActionSetHandle, ulong ulDeviceHandle, [MarshalAs(UnmanagedType.I1)] bool bShowOnDesktop); [MarshalAs(UnmanagedType.FunctionPtr)] internal _OpenBindingUI OpenBindingUI; @@ -1846,6 +1967,7 @@ public struct IVRIOBuffer internal _PropertyContainer PropertyContainer; [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] internal delegate bool _HasReaders(ulong ulBuffer); [MarshalAs(UnmanagedType.FunctionPtr)] internal _HasReaders HasReaders; @@ -1902,6 +2024,70 @@ public struct IVRDebug } +[StructLayout(LayoutKind.Sequential)] +public struct IVRIPCResourceManagerClient +{ + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _NewSharedVulkanImage(uint nImageFormat, uint nWidth, uint nHeight, [MarshalAs(UnmanagedType.I1)] bool bRenderable, [MarshalAs(UnmanagedType.I1)] bool bMappable, [MarshalAs(UnmanagedType.I1)] bool bComputeAccess, uint unMipLevels, uint unArrayLayerCount, uint unAdditionalVkCreateFlags, uint unAdditionalVkUsageFlags, ref ulong pSharedHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _NewSharedVulkanImage NewSharedVulkanImage; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _NewSharedVulkanBuffer(uint nSize, uint nUsageFlags, ref ulong pSharedHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _NewSharedVulkanBuffer NewSharedVulkanBuffer; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _NewSharedVulkanSemaphore([MarshalAs(UnmanagedType.I1)] bool bCounting, ref ulong pSharedHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _NewSharedVulkanSemaphore NewSharedVulkanSemaphore; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _RefResource(ulong hSharedHandle, ref ulong pNewIpcHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _RefResource RefResource; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _UnrefResource(ulong hSharedHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _UnrefResource UnrefResource; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _GetDmabufFormats(ref uint pOutFormatCount, ref uint pOutFormats); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetDmabufFormats GetDmabufFormats; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _GetDmabufModifiers(EVRApplicationType eApplicationType, uint unDRMFormat, ref uint pOutModifierCount, ref ulong pOutModifiers); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetDmabufModifiers GetDmabufModifiers; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _ImportDmabuf(EVRApplicationType eApplicationType, ref DmabufAttributes_t pDmabufAttributes, ref ulong pSharedHandle); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ImportDmabuf ImportDmabuf; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.I1)] + internal delegate bool _ReceiveSharedFd(ulong ulIpcHandle, ref int pOutFd); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _ReceiveSharedFd ReceiveSharedFd; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate void _DestructIVRIPCResourceManagerClient(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _DestructIVRIPCResourceManagerClient DestructIVRIPCResourceManagerClient; + +} + [StructLayout(LayoutKind.Sequential)] public struct IVRProperties { @@ -1996,7 +2182,7 @@ public struct IVRBlockQueue internal _ReleaseReadOnlyBlock ReleaseReadOnlyBlock; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate EBlockQueueError _QueueHasReader(ulong ulQueueHandle, ref bool pbHasReaders); + internal delegate EBlockQueueError _QueueHasReader(ulong ulQueueHandle, [MarshalAs(UnmanagedType.I1)] ref bool pbHasReaders); [MarshalAs(UnmanagedType.FunctionPtr)] internal _QueueHasReader QueueHasReader; @@ -2054,6 +2240,11 @@ public bool ComputeDistortion(EVREye eEye,float fU,float fV,ref DistortionCoordi bool result = FnTable.ComputeDistortion(eEye,fU,fV,ref pDistortionCoordinates); return result; } + public bool ComputeDistortionSet(EVREye eEye,EVRDistortionChannel eChannel,bool bAsNormalizedDeviceCoordinates,uint nNumCoordinates,ref DistortionCoordinate_t pInput,ref DistortionCoordinate_t pOutput) + { + bool result = FnTable.ComputeDistortionSet(eEye,eChannel,bAsNormalizedDeviceCoordinates,nNumCoordinates,ref pInput,ref pOutput); + return result; + } public HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye) { HmdMatrix34_t result = FnTable.GetEyeToHeadTransform(eEye); @@ -2210,11 +2401,43 @@ public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent) bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent); return result; } +// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were +// originally mis-compiled with the wrong packing for Linux and OSX. + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _PollNextEventWithPosePacked(ETrackingUniverseOrigin eOrigin,ref VREvent_t_Packed pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose); + [StructLayout(LayoutKind.Explicit)] + struct PollNextEventWithPoseUnion + { + [FieldOffset(0)] + public IVRSystem._PollNextEventWithPose pPollNextEventWithPose; + [FieldOffset(0)] + public _PollNextEventWithPosePacked pPollNextEventWithPosePacked; + } public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose) { +#if !UNITY_METRO + if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) || + (System.Environment.OSVersion.Platform == System.PlatformID.Unix)) + { + PollNextEventWithPoseUnion u; + VREvent_t_Packed event_packed = new VREvent_t_Packed(); + u.pPollNextEventWithPosePacked = null; + u.pPollNextEventWithPose = FnTable.PollNextEventWithPose; + bool packed_result = u.pPollNextEventWithPosePacked(eOrigin,ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed)),ref pTrackedDevicePose); + + event_packed.Unpack(ref pEvent); + return packed_result; + } +#endif bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose); return result; } + public bool PollNextEventWithPoseAndOverlays(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose,ref ulong pulOverlayHandle) + { + pulOverlayHandle = 0; + bool result = FnTable.PollNextEventWithPoseAndOverlays(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose,ref pulOverlayHandle); + return result; + } public string GetEventTypeNameFromEnum(EVREventType eType) { IntPtr result = FnTable.GetEventTypeNameFromEnum(eType); @@ -2225,6 +2448,16 @@ public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye,EHiddenAreaMeshType type) HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye,type); return result; } + public bool GetEyeTrackedFoveationCenter(ref HmdVector2_t pNdcLeft,ref HmdVector2_t pNdcRight) + { + bool result = FnTable.GetEyeTrackedFoveationCenter(ref pNdcLeft,ref pNdcRight); + return result; + } + public bool GetEyeTrackedFoveationCenterForProjection(ref HmdMatrix44_t pProjMat,ref HmdVector2_t pNdc) + { + bool result = FnTable.GetEyeTrackedFoveationCenterForProjection(ref pProjMat,ref pNdc); + return result; + } // This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were // originally mis-compiled with the wrong packing for Linux and OSX. [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -2340,6 +2573,11 @@ public string GetRuntimeVersion() IntPtr result = FnTable.GetRuntimeVersion(); return Marshal.PtrToStringAnsi(result); } + public EVRInitError SetSDKVersion(uint nVersionMajor,uint nVersionMinor,uint nVersionBuild) + { + EVRInitError result = FnTable.SetSDKVersion(nVersionMajor,nVersionMinor,nVersionBuild); + return result; + } } @@ -2666,6 +2904,11 @@ public EVRApplicationError LaunchInternalProcess(string pchBinaryPath,string pch Marshal.FreeHGlobal(pchWorkingDirectoryUtf8); return result; } + public EVRApplicationError RegisterSubprocess(uint nPid) + { + EVRApplicationError result = FnTable.RegisterSubprocess(nPid); + return result; + } public uint GetCurrentSceneProcessId() { uint result = FnTable.GetCurrentSceneProcessId(); @@ -2868,11 +3111,22 @@ public EVRCompositorError GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex,re EVRCompositorError result = FnTable.GetLastPoseForTrackedDeviceIndex(unDeviceIndex,ref pOutputPose,ref pOutputGamePose); return result; } + public EVRCompositorError GetSubmitTexture(ref Texture_t pOutTexture,ref bool pNeedsFlush,EVRCompositorTextureUsage eUsage,ref Texture_t pTexture,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags) + { + pNeedsFlush = false; + EVRCompositorError result = FnTable.GetSubmitTexture(ref pOutTexture,ref pNeedsFlush,eUsage,ref pTexture,ref pBounds,nSubmitFlags); + return result; + } public EVRCompositorError Submit(EVREye eEye,ref Texture_t pTexture,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags) { EVRCompositorError result = FnTable.Submit(eEye,ref pTexture,ref pBounds,nSubmitFlags); return result; } + public EVRCompositorError SubmitWithArrayIndex(EVREye eEye,ref Texture_t pTexture,uint unTextureArrayIndex,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags) + { + EVRCompositorError result = FnTable.SubmitWithArrayIndex(eEye,ref pTexture,unTextureArrayIndex,ref pBounds,nSubmitFlags); + return result; + } public void ClearLastSubmittedFrame() { FnTable.ClearLastSubmittedFrame(); @@ -3111,6 +3365,16 @@ public EVROverlayError CreateOverlay(string pchOverlayKey,string pchOverlayName, Marshal.FreeHGlobal(pchOverlayNameUtf8); return result; } + public EVROverlayError CreateSubviewOverlay(ulong parentOverlayHandle,string pchSubviewOverlayKey,string pchSubviewOverlayName,ref ulong pSubviewOverlayHandle) + { + IntPtr pchSubviewOverlayKeyUtf8 = Utils.ToUtf8(pchSubviewOverlayKey); + IntPtr pchSubviewOverlayNameUtf8 = Utils.ToUtf8(pchSubviewOverlayName); + pSubviewOverlayHandle = 0; + EVROverlayError result = FnTable.CreateSubviewOverlay(parentOverlayHandle,pchSubviewOverlayKeyUtf8,pchSubviewOverlayNameUtf8,ref pSubviewOverlayHandle); + Marshal.FreeHGlobal(pchSubviewOverlayKeyUtf8); + Marshal.FreeHGlobal(pchSubviewOverlayNameUtf8); + return result; + } public EVROverlayError DestroyOverlay(ulong ulOverlayHandle) { EVROverlayError result = FnTable.DestroyOverlay(ulOverlayHandle); @@ -3325,6 +3589,11 @@ public EVROverlayError SetOverlayTransformProjection(ulong ulOverlayHandle,ETrac EVROverlayError result = FnTable.SetOverlayTransformProjection(ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform,ref pProjection,eEye); return result; } + public EVROverlayError SetSubviewPosition(ulong ulOverlayHandle,float fX,float fY) + { + EVROverlayError result = FnTable.SetSubviewPosition(ulOverlayHandle,fX,fY); + return result; + } public EVROverlayError ShowOverlay(ulong ulOverlayHandle) { EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle); @@ -4136,6 +4405,16 @@ public EVRInputError SetDominantHand(ETrackedControllerRole eDominantHand) EVRInputError result = FnTable.SetDominantHand(eDominantHand); return result; } + public EVRInputError GetEyeTrackingDataRelativeToNow(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref VREyeTrackingData_t pEyeTrackingData,uint ulEyeTrackingDataSize) + { + EVRInputError result = FnTable.GetEyeTrackingDataRelativeToNow(action,eOrigin,fPredictedSecondsFromNow,ref pEyeTrackingData,ulEyeTrackingDataSize); + return result; + } + public EVRInputError GetEyeTrackingDataForNextFrame(ulong action,ETrackingUniverseOrigin eOrigin,ref VREyeTrackingData_t pEyeTrackingData,uint ulEyeTrackingDataSize) + { + EVRInputError result = FnTable.GetEyeTrackingDataForNextFrame(action,eOrigin,ref pEyeTrackingData,ulEyeTrackingDataSize); + return result; + } public EVRInputError GetBoneCount(ulong action,ref uint pBoneCount) { pBoneCount = 0; @@ -4203,10 +4482,10 @@ public EVRInputError GetOriginTrackedDeviceInfo(ulong origin,ref InputOriginInfo 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) + public EVRInputError GetActionBindingInfo(ulong action,InputBindingInfo_t [] pOriginInfo,uint unBindingInfoSize,ref uint punReturnedBindingInfoCount) { punReturnedBindingInfoCount = 0; - EVRInputError result = FnTable.GetActionBindingInfo(action,ref pOriginInfo,unBindingInfoSize,unBindingInfoCount,ref punReturnedBindingInfoCount); + EVRInputError result = FnTable.GetActionBindingInfo(action,pOriginInfo,unBindingInfoSize,(uint) pOriginInfo.Length,ref punReturnedBindingInfoCount); return result; } public EVRInputError ShowActionOrigins(ulong actionSetHandle,ulong ulActionHandle) @@ -4364,6 +4643,75 @@ public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,System.Text. } +public class CVRIPCResourceManagerClient +{ + IVRIPCResourceManagerClient FnTable; + internal CVRIPCResourceManagerClient(IntPtr pInterface) + { + FnTable = (IVRIPCResourceManagerClient)Marshal.PtrToStructure(pInterface, typeof(IVRIPCResourceManagerClient)); + } + public bool NewSharedVulkanImage(uint nImageFormat,uint nWidth,uint nHeight,bool bRenderable,bool bMappable,bool bComputeAccess,uint unMipLevels,uint unArrayLayerCount,uint unAdditionalVkCreateFlags,uint unAdditionalVkUsageFlags,ref ulong pSharedHandle) + { + pSharedHandle = 0; + bool result = FnTable.NewSharedVulkanImage(nImageFormat,nWidth,nHeight,bRenderable,bMappable,bComputeAccess,unMipLevels,unArrayLayerCount,unAdditionalVkCreateFlags,unAdditionalVkUsageFlags,ref pSharedHandle); + return result; + } + public bool NewSharedVulkanBuffer(uint nSize,uint nUsageFlags,ref ulong pSharedHandle) + { + pSharedHandle = 0; + bool result = FnTable.NewSharedVulkanBuffer(nSize,nUsageFlags,ref pSharedHandle); + return result; + } + public bool NewSharedVulkanSemaphore(bool bCounting,ref ulong pSharedHandle) + { + pSharedHandle = 0; + bool result = FnTable.NewSharedVulkanSemaphore(bCounting,ref pSharedHandle); + return result; + } + public bool RefResource(ulong hSharedHandle,ref ulong pNewIpcHandle) + { + pNewIpcHandle = 0; + bool result = FnTable.RefResource(hSharedHandle,ref pNewIpcHandle); + return result; + } + public bool UnrefResource(ulong hSharedHandle) + { + bool result = FnTable.UnrefResource(hSharedHandle); + return result; + } + public bool GetDmabufFormats(ref uint pOutFormatCount,ref uint pOutFormats) + { + pOutFormatCount = 0; + pOutFormats = 0; + bool result = FnTable.GetDmabufFormats(ref pOutFormatCount,ref pOutFormats); + return result; + } + public bool GetDmabufModifiers(EVRApplicationType eApplicationType,uint unDRMFormat,ref uint pOutModifierCount,ref ulong pOutModifiers) + { + pOutModifierCount = 0; + pOutModifiers = 0; + bool result = FnTable.GetDmabufModifiers(eApplicationType,unDRMFormat,ref pOutModifierCount,ref pOutModifiers); + return result; + } + public bool ImportDmabuf(EVRApplicationType eApplicationType,ref DmabufAttributes_t pDmabufAttributes,ref ulong pSharedHandle) + { + pSharedHandle = 0; + bool result = FnTable.ImportDmabuf(eApplicationType,ref pDmabufAttributes,ref pSharedHandle); + return result; + } + public bool ReceiveSharedFd(ulong ulIpcHandle,ref int pOutFd) + { + pOutFd = 0; + bool result = FnTable.ReceiveSharedFd(ulIpcHandle,ref pOutFd); + return result; + } + public void DestructIVRIPCResourceManagerClient() + { + FnTable.DestructIVRIPCResourceManagerClient(); + } +} + + public class CVRProperties { IVRProperties FnTable; @@ -4535,6 +4883,8 @@ public enum ETextureType DirectX12 = 4, DXGISharedHandle = 5, Metal = 6, + Reserved = 7, + SharedTextureHandle = 8, } public enum EColorSpace { @@ -4641,12 +4991,19 @@ public enum ETrackedDeviceProperty Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, Prop_DevicePowerUsage_Float = 1052, Prop_IgnoreMotionForStandby_Bool = 1053, + Prop_ActualTrackingSystemName_String = 1054, + Prop_AllowCameraToggle_Bool = 1055, + Prop_AllowLightSourceFrequency_Bool = 1056, + Prop_SteamRemoteClientID_Uint64 = 1057, + Prop_Reserved_1058 = 1058, + Prop_Reserved_1059 = 1059, + Prop_Reserved_1060 = 1060, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, Prop_UserIpdMeters_Float = 2003, Prop_CurrentUniverseId_Uint64 = 2004, - Prop_PreviousUniverseId_Uint64 = 2005, + Prop_PreviousUniverseId_Uint64_deprecated = 0, Prop_DisplayFirmwareVersion_Uint64 = 2006, Prop_IsOnDesktop_Bool = 2007, Prop_DisplayMCType_Int32 = 2008, @@ -4729,10 +5086,12 @@ public enum ETrackedDeviceProperty Prop_CameraExposureTime_Float = 2088, Prop_CameraGlobalGain_Float = 2089, Prop_DashboardScale_Float = 2091, - Prop_PeerButtonInfo_String = 2092, Prop_Hmd_SupportsHDR10_Bool = 2093, Prop_Hmd_EnableParallelRenderCameras_Bool = 2094, Prop_DriverProvidedChaperoneJson_String = 2095, + Prop_ForceSystemLayerUseAppPoses_Bool = 2096, + Prop_DashboardLinkSupport_Int32 = 2097, + Prop_DisplayMinUIAnalogGain_Float = 2098, Prop_IpdUIRangeMinMeters_Float = 2100, Prop_IpdUIRangeMaxMeters_Float = 2101, Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102, @@ -4741,9 +5100,15 @@ public enum ETrackedDeviceProperty Prop_Hmd_SupportsRoomViewDirect_Bool = 2105, Prop_Hmd_SupportsAppThrottling_Bool = 2106, Prop_Hmd_SupportsGpuBusMonitoring_Bool = 2107, - Prop_DSCVersion_Int32 = 2110, - Prop_DSCSliceCount_Int32 = 2111, - Prop_DSCBPPx16_Int32 = 2112, + Prop_DriverDisplaysIPDChanges_Bool = 2108, + Prop_Reserved_2110 = 2110, + Prop_Reserved_2111 = 2111, + Prop_Reserved_2112 = 2112, + Prop_Hmd_MaxDistortedTextureWidth_Int32 = 2113, + Prop_Hmd_MaxDistortedTextureHeight_Int32 = 2114, + Prop_Hmd_AllowSupersampleFiltering_Bool = 2115, + Prop_Hmd_AllowsClientToControlTextureIndex = 2116, + Prop_Reserved_2117 = 2117, Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, @@ -4757,6 +5122,14 @@ public enum ETrackedDeviceProperty Prop_Audio_DefaultRecordingDeviceId_String = 2301, Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, + Prop_Audio_DriverManagesPlaybackVolumeControl_Bool = 2304, + Prop_Audio_DriverPlaybackVolume_Float = 2305, + Prop_Audio_DriverPlaybackMute_Bool = 2306, + Prop_Audio_DriverManagesRecordingVolumeControl_Bool = 2307, + Prop_Audio_DriverRecordingVolume_Float = 2308, + Prop_Audio_DriverRecordingMute_Bool = 2309, + Prop_Audio_PipewirePlaybackNode_Int32 = 2400, + Prop_Audio_PipewireRecordingNode_Int32 = 2401, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -4796,10 +5169,19 @@ public enum ETrackedDeviceProperty Prop_HasDriverDirectModeComponent_Bool = 6005, Prop_HasVirtualDisplayComponent_Bool = 6006, Prop_HasSpatialAnchorsSupport_Bool = 6007, + Prop_SupportsXrTextureSets_Bool = 6008, + Prop_SupportsXrEyeGazeInteraction_Bool = 6009, + Prop_DeviceHasNoIMU_Bool = 6010, + Prop_UseAdvancedPrediction_Bool = 6011, Prop_ControllerType_String = 7000, Prop_ControllerHandSelectionPriority_Int32 = 7002, Prop_VendorSpecific_Reserved_Start = 10000, Prop_VendorSpecific_Reserved_End = 10999, + Prop_Reserved_11000 = 11000, + Prop_Reserved_11001 = 11001, + Prop_Reserved_11002 = 11002, + Prop_Reserved_11003 = 11003, + Prop_Reserved_11004 = 11004, Prop_TrackedDeviceProperty_Max = 1000000, } public enum ETrackedPropertyError @@ -4836,11 +5218,16 @@ public enum EVRSubmitFlags Submit_Reserved = 4, Submit_TextureWithPose = 8, Submit_TextureWithDepth = 16, - Submit_FrameDiscontinuty = 32, + Submit_FrameDiscontinuity = 32, Submit_VulkanTextureWithArrayData = 64, Submit_GlArrayTexture = 128, + Submit_IsEgl = 256, + Submit_TextureWithMotion = 536, Submit_Reserved2 = 32768, Submit_Reserved3 = 65536, + Submit_Reserved4 = 131072, + Submit_Reserved5 = 262144, + Submit_Reserved6 = 524288, } public enum EVRState { @@ -4871,6 +5258,8 @@ public enum EVREventType VREvent_PropertyChanged = 111, VREvent_WirelessDisconnect = 112, VREvent_WirelessReconnect = 113, + VREvent_Reserved_0114 = 114, + VREvent_Reserved_0115 = 115, VREvent_ButtonPress = 200, VREvent_ButtonUnpress = 201, VREvent_ButtonTouch = 202, @@ -4904,7 +5293,6 @@ public enum EVREventType VREvent_OverlayHidden = 501, VREvent_DashboardActivated = 502, VREvent_DashboardDeactivated = 503, - VREvent_DashboardRequested = 505, VREvent_ResetDashboard = 506, VREvent_ImageLoaded = 508, VREvent_ShowKeyboard = 509, @@ -4931,6 +5319,20 @@ public enum EVREventType VREvent_StartDashboard = 532, VREvent_ElevatePrism = 533, VREvent_OverlayClosed = 534, + VREvent_DashboardThumbChanged = 535, + VREvent_DesktopMightBeVisible = 536, + VREvent_DesktopMightBeHidden = 537, + VREvent_MutualSteamCapabilitiesChanged = 538, + VREvent_OverlayCreated = 539, + VREvent_OverlayDestroyed = 540, + VREvent_OverlayNameChanged = 544, + VREvent_TrackingRecordingStarted = 541, + VREvent_TrackingRecordingStopped = 542, + VREvent_SetTrackingRecordingPath = 543, + VREvent_Reserved_0560 = 560, + VREvent_Reserved_0561 = 561, + VREvent_Reserved_0562 = 562, + VREvent_Reserved_0563 = 563, VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, VREvent_Notification_BeginInteraction = 602, @@ -4941,6 +5343,7 @@ public enum EVREventType VREvent_DriverRequestedQuit = 704, VREvent_RestartRequested = 705, VREvent_InvalidateSwapTextureSets = 706, + VREvent_RequestDisconnectWirelessHMD = 707, VREvent_ChaperoneDataHasChanged = 800, VREvent_ChaperoneUniverseHasChanged = 801, VREvent_ChaperoneTempDataHasChanged = 802, @@ -4948,8 +5351,14 @@ public enum EVREventType VREvent_SeatedZeroPoseReset = 804, VREvent_ChaperoneFlushCache = 805, VREvent_ChaperoneRoomSetupStarting = 806, - VREvent_ChaperoneRoomSetupFinished = 807, + VREvent_ChaperoneRoomSetupCommitted = 807, VREvent_StandingZeroPoseReset = 808, + VREvent_Reserved_0809 = 809, + VREvent_Reserved_0810 = 810, + VREvent_Reserved_0811 = 811, + VREvent_Reserved_0812 = 812, + VREvent_Reserved_0813 = 813, + VREvent_Reserved_0814 = 814, VREvent_AudioSettingsHaveChanged = 820, VREvent_BackgroundSettingHasChanged = 850, VREvent_CameraSettingsHaveChanged = 851, @@ -4973,6 +5382,8 @@ public enum EVREventType VREvent_GpuSpeedSectionSettingChanged = 869, VREvent_WindowsMRSectionSettingChanged = 870, VREvent_OtherSectionSettingChanged = 871, + VREvent_AnyDriverSettingsChanged = 872, + VREvent_Reserved_0873 = 873, VREvent_StatusUpdate = 900, VREvent_WebInterface_InstallDriverCompleted = 950, VREvent_MCImageUpdated = 1000, @@ -4981,6 +5392,8 @@ public enum EVREventType VREvent_KeyboardClosed = 1200, VREvent_KeyboardCharInput = 1201, VREvent_KeyboardDone = 1202, + VREvent_KeyboardOpened_Global = 1203, + VREvent_KeyboardClosed_Global = 1204, VREvent_ApplicationListUpdated = 1303, VREvent_ApplicationMimeTypeLoad = 1304, VREvent_ProcessConnected = 1306, @@ -5022,6 +5435,11 @@ public enum EVREventType VREvent_SystemReport_Started = 1900, VREvent_Monitor_ShowHeadsetView = 2000, VREvent_Monitor_HideHeadsetView = 2001, + VREvent_Audio_SetSpeakersVolume = 2100, + VREvent_Audio_SetSpeakersMute = 2101, + VREvent_Audio_SetMicrophoneVolume = 2102, + VREvent_Audio_SetMicrophoneMute = 2103, + VREvent_RenderModel_CountChanged = 2200, VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, } @@ -5221,6 +5639,7 @@ public enum EVRNotificationError NotificationQueueFull = 101, InvalidOverlayHandle = 102, SystemWithUserValueAlreadyExists = 103, + ServiceUnavailable = 104, } public enum EVRSkeletalMotionRange { @@ -5307,6 +5726,8 @@ public enum EVRInitError Init_VRDashboardTokenFailure = 165, Init_VRDashboardEnvironmentFailure = 166, Init_VRDashboardPathFailure = 167, + Init_InstallationTooOld = 168, + Init_ClientVersionAlreadyProvided = 169, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -5429,6 +5850,11 @@ public enum EVRInitError Compositor_SystemLayerCreateSession = 493, Compositor_CreateInverseDistortUVs = 494, Compositor_CreateBackbufferDepth = 495, + Compositor_CannotDRMLeaseDisplay = 496, + Compositor_CannotConnectToDisplayServer = 497, + Compositor_GnomeNoDRMLeasing = 498, + Compositor_FailedToInitializeEncoder = 499, + Compositor_CreateBlurTexture = 500, VendorSpecific_UnableToConnectToOculusRuntime = 1000, VendorSpecific_WindowsNotInDevMode = 1001, VendorSpecific_OculusLinkNotEnabled = 1002, @@ -5447,6 +5873,10 @@ public enum EVRInitError VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, VendorSpecific_OculusRuntimeBadInstall = 1114, VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115, + VendorSpecific_Oasis_UnlockRequired = 1150, + VendorSpecific_VRLink_OutdatedDriverMESA = 1200, + VendorSpecific_VRLink_OutdatedDriverNVIDIA = 1201, + VendorSpecific_VRLink_NoVideoSupport = 1202, Steam_SteamInstallationNotFound = 2000, LastError = 2001, } @@ -5525,6 +5955,16 @@ public enum Imu_OffScaleFlags OffScale_GyroY = 16, OffScale_GyroZ = 32, } +public enum EVRDistortionChannel +{ + Red = 0, + Green = 1, + Blue = 2, + InverseRed = 3, + InverseGreen = 4, + InverseBlue = 5, + Count = 6, +} public enum EVRApplicationError { None = 0, @@ -5544,6 +5984,7 @@ public enum EVRApplicationError TransitionAborted = 113, IsTemplate = 114, SteamVRIsExiting = 115, + WaitingForChaperone = 116, BufferTooSmall = 200, PropertyNotSet = 201, UnknownProperty = 202, @@ -5561,6 +6002,7 @@ public enum EVRApplicationProperty Description_String = 50, NewsURL_String = 51, ImagePath_String = 52, + ImagePathCapsule_String = 55, Source_String = 53, ActionManifestURL_String = 54, IsDashboardOverlay_Bool = 60, @@ -5617,6 +6059,12 @@ public enum EVRCompositorError InvalidBounds = 109, AlreadySet = 110, } +public enum EVRCompositorTextureUsage +{ + Left = 0, + Right = 1, + Both = 2, +} public enum EVRCompositorTimingMode { Implicit = 0, @@ -5661,7 +6109,13 @@ public enum VROverlayFlags WantsModalBehavior = 1048576, IsPremultiplied = 2097152, IgnoreTextureAlpha = 4194304, - Reserved = 67108864, + EnableControlBar = 8388608, + EnableControlBarKeyboard = 16777216, + EnableControlBarClose = 33554432, + MinimalControlBar = 67108864, + EnableClickStabilization = 134217728, + MultiCursor = 268435456, + NoBackside = 536870912, } public enum VRMessageOverlayResponse { @@ -5693,6 +6147,8 @@ public enum EKeyboardFlags { KeyboardFlag_Minimal = 1, KeyboardFlag_Modal = 2, + KeyboardFlag_ShowArrowKeys = 4, + KeyboardFlag_HideDoneKey = 8, } public enum EDeviceType { @@ -5753,6 +6209,7 @@ public enum EVRSettingsError ReadFailed = 3, JsonParseFailed = 4, UnsetSettingHasNoDefault = 5, + AccessDenied = 6, } public enum EVRScreenshotError { @@ -5891,6 +6348,8 @@ public enum EBlockQueueCreationFlag [FieldOffset(0)] public VREvent_ShowUI_t showUi; [FieldOffset(0)] public VREvent_ShowDevTools_t showDevTools; [FieldOffset(0)] public VREvent_HDCPError_t hdcpError; + [FieldOffset(0)] public VREvent_AudioVolumeControl_t audioVolumeControl; + [FieldOffset(0)] public VREvent_AudioMuteControl_t audioMuteControl; [FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug } @@ -6045,6 +6504,17 @@ private static void _copysign(ref float sizeval, float signval) public HmdVector4_t position; public HmdQuaternionf_t orientation; } +[StructLayout(LayoutKind.Sequential)] public struct VREyeTrackingData_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bActive; + [MarshalAs(UnmanagedType.I1)] + public bool bValid; + [MarshalAs(UnmanagedType.I1)] + public bool bTracked; + public HmdVector3_t vGazeOrigin; + public HmdVector3_t vGazeTarget; +} [StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t { public float rfRed0; //float[2] @@ -6095,6 +6565,38 @@ private static void _copysign(ref float sizeval, float signval) public HmdMatrix34_t mDeviceToAbsoluteTracking; public VRTextureDepthInfo_t depth; } +[StructLayout(LayoutKind.Sequential)] public struct VRTextureMotionInfo_t +{ + public IntPtr handle; // void * + public HmdMatrix44_t mDeltaPose; +} +[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithMotion_t +{ + public VRTextureMotionInfo_t motion; +} +[StructLayout(LayoutKind.Sequential)] public struct DmabufPlane_t +{ + public uint unOffset; + public uint unStride; + public int nFd; +} +[StructLayout(LayoutKind.Sequential)] public struct DmabufAttributes_t +{ + public IntPtr pNext; // void * + public uint unWidth; + public uint unHeight; + public uint unDepth; + public uint unMipLevels; + public uint unArrayLayers; + public uint unSampleCount; + public uint unFormat; + public ulong ulModifier; + public uint unPlaneCount; + public DmabufPlane_t plane0; //DmabufPlane_t[4] + public DmabufPlane_t plane1; + public DmabufPlane_t plane2; + public DmabufPlane_t plane3; +} [StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t { public HmdMatrix34_t mDeviceToAbsoluteTracking; @@ -6139,6 +6641,7 @@ private static void _copysign(ref float sizeval, float signval) public float x; public float y; public uint button; + public uint cursorIndex; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Scroll_t { @@ -6146,6 +6649,7 @@ private static void _copysign(ref float sizeval, float signval) public float ydelta; public uint unused; public float viewportscale; + public uint cursorIndex; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t { @@ -6176,6 +6680,7 @@ private static void _copysign(ref float sizeval, float signval) public ulong overlayHandle; public ulong devicePath; public ulong memoryBlockId; + public uint cursorIndex; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t { @@ -6201,6 +6706,7 @@ public string cNewInput } } public ulong uUserValue; + public ulong overlayHandle; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Ipd_t { @@ -6208,7 +6714,7 @@ public string cNewInput } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Chaperone_t { - public ulong m_nPreviousUniverse; + public ulong m_nPreviousUniverse_deprecated; public ulong m_nCurrentUniverse; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_Reserved_t @@ -6308,6 +6814,15 @@ public string cNewInput { public EHDCPError eCode; } +[StructLayout(LayoutKind.Sequential)] public struct VREvent_AudioVolumeControl_t +{ + public float fVolumeLevel; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_AudioMuteControl_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bMute; +} [StructLayout(LayoutKind.Sequential)] public struct VREvent_t { public uint eventType; @@ -6436,6 +6951,7 @@ public void Unpack(ref VRControllerState_t unpacked) public TrackedDevicePose_t m_HmdPose; public uint m_nNumVSyncsReadyForUse; public uint m_nNumVSyncsToFirstView; + public float m_flTransferLatencyMs; } [StructLayout(LayoutKind.Sequential)] public struct Compositor_BenchmarkResults { @@ -6457,6 +6973,11 @@ public void Unpack(ref VRControllerState_t unpacked) public HmdVector3d_t vGyro; public uint unOffScaleFlags; } +[StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinate_t +{ + public float u; + public float v; +} [StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t { public IntPtr pchKey; // const char * @@ -6480,11 +7001,11 @@ public void Unpack(ref VRControllerState_t unpacked) public uint m_nNumDroppedFramesTimedOut; public uint m_nNumReprojectedFramesTimedOut; public uint m_nNumFrameSubmits; - public vrshared_double m_flSumCompositorCPUTimeMS; - public vrshared_double m_flSumCompositorGPUTimeMS; - public vrshared_double m_flSumTargetFrameTimes; - public vrshared_double m_flSumApplicationCPUTimeMS; - public vrshared_double m_flSumApplicationGPUTimeMS; + public double m_flSumCompositorCPUTimeMS; + public double m_flSumCompositorGPUTimeMS; + public double m_flSumTargetFrameTimes; + public double m_flSumApplicationCPUTimeMS; + public double m_flSumApplicationGPUTimeMS; public uint m_nNumFramesWithDepth; } [StructLayout(LayoutKind.Sequential)] public struct Compositor_StageRenderSettings @@ -7464,6 +7985,7 @@ public string rchInputSourceType public IntPtr m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * public IntPtr m_pVRDebug; // class vr::IVRDebug * public IntPtr m_pVRNotifications; // class vr::IVRNotifications * + public IntPtr m_pVRIPCResourceManagerClient; // class vr::IVRIPCResourceManagerClient * } [StructLayout(LayoutKind.Sequential)] public struct PropertyWrite_t { @@ -7488,6 +8010,11 @@ public string rchInputSourceType { public IntPtr m_pProperties; // class vr::IVRProperties * } +[StructLayout(LayoutKind.Sequential)] public struct PathWriteOptions_t +{ + [MarshalAs(UnmanagedType.I1)] + public bool bPostEvents; +} [StructLayout(LayoutKind.Sequential)] public struct PathWrite_t { public ulong ulPath; @@ -7498,6 +8025,10 @@ public string rchInputSourceType public uint unTag; public ETrackedPropertyError eError; public IntPtr pszPath; // const char * + [MarshalAs(UnmanagedType.I1)] + public bool bPostEvents; + [MarshalAs(UnmanagedType.I1)] + public bool bValueChanged; } [StructLayout(LayoutKind.Sequential)] public struct PathRead_t { @@ -7578,6 +8109,7 @@ public static uint GetInitToken() return OpenVRInterop.GetInitToken(); } + public const uint MaxDmabufPlaneCount = 4; public const uint k_nDriverNone = 4294967295; public const uint k_unMaxDriverDebugResponseSize = 32768; public const uint k_unTrackedDeviceIndex_Hmd = 0; @@ -7616,25 +8148,26 @@ public static uint GetInitToken() public const ulong k_ulInvalidActionHandle = 0; public const ulong k_ulInvalidActionSetHandle = 0; public const ulong k_ulInvalidInputValueHandle = 0; + public const ulong k_ulInvalidInputComponentHandle = 0; public const uint k_unControllerStateAxisCount = 5; public const ulong k_ulOverlayHandleInvalid = 0; public const uint k_unMaxDistortionFunctionParameters = 8; public const uint k_unScreenshotHandleInvalid = 0; - public const string IVRSystem_Version = "IVRSystem_022"; + public const string IVRSystem_Version = "IVRSystem_026"; public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; public const string IVRTrackedCamera_Version = "IVRTrackedCamera_006"; public const uint k_unMaxApplicationKeyLength = 128; public const string k_pch_MimeType_HomeApp = "vr/home"; public const string k_pch_MimeType_GameTheater = "vr/game_theater"; - public const string IVRApplications_Version = "IVRApplications_007"; + public const string IVRApplications_Version = "IVRApplications_008"; public const string IVRChaperone_Version = "IVRChaperone_004"; public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; - public const string IVRCompositor_Version = "IVRCompositor_027"; + public const string IVRCompositor_Version = "IVRCompositor_029"; public const uint k_unVROverlayMaxKeyLength = 128; public const uint k_unVROverlayMaxNameLength = 128; public const uint k_unMaxOverlayCount = 128; public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; - public const string IVROverlay_Version = "IVROverlay_027"; + public const string IVROverlay_Version = "IVROverlay_028"; public const string IVROverlayView_Version = "IVROverlayView_003"; public const uint k_unHeadsetViewMaxWidth = 3840; public const uint k_unHeadsetViewMaxHeight = 2160; @@ -7643,7 +8176,10 @@ public static uint GetInitToken() public const string k_pch_Controller_Component_GDC2015 = "gdc2015"; public const string k_pch_Controller_Component_Base = "base"; public const string k_pch_Controller_Component_Tip = "tip"; + public const string k_pch_Controller_Component_OpenXR_Aim = "openxr_aim"; public const string k_pch_Controller_Component_HandGrip = "handgrip"; + public const string k_pch_Controller_Component_OpenXR_Grip = "openxr_grip"; + public const string k_pch_Controller_Component_OpenXR_HandModel = "openxr_handmodel"; public const string k_pch_Controller_Component_Status = "status"; public const string IVRRenderModels_Version = "IVRRenderModels_006"; public const uint k_unNotificationTextMaxSize = 256; @@ -7651,6 +8187,7 @@ public static uint GetInitToken() public const uint k_unMaxSettingsKeyLength = 128; public const string IVRSettings_Version = "IVRSettings_003"; public const string k_pch_SteamVR_Section = "steamvr"; + public const string k_pch_SteamVR_Contrast_Float = "contrast"; public const string k_pch_SteamVR_RequireHmd_String = "requireHmd"; public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; public const string k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; @@ -7668,6 +8205,7 @@ public static uint GetInitToken() public const string k_pch_SteamVR_GridColor_String = "gridColor"; public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; public const string k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; + public const string k_pch_SteamVR_StartColor_String = "startColor"; public const string k_pch_SteamVR_ShowStage_Bool = "showStage"; public const string k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences"; public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; @@ -7680,10 +8218,17 @@ public static uint GetInitToken() public const string k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; public const string k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; public const string k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + public const string k_pch_SteamVR_FoveatedSharpening_Bool = "sharpening"; + public const string k_pch_SteamVR_FoveatedSharpeningOverride_Int32 = "sharpeningOverride"; public const string k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle"; public const string k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict"; public const string k_pch_SteamVR_WorldScale_Float = "worldScale"; public const string k_pch_SteamVR_FovScale_Int32 = "fovScale"; + public const string k_pch_SteamVR_FovScaleInner_Int32 = "fovScaleInner"; + public const string k_pch_SteamVR_FovScaleUpper_Int32 = "fovScaleUpper"; + public const string k_pch_SteamVR_FovScaleLower_Int32 = "fovScaleLower"; + public const string k_pch_SteamVR_FovScaleFormat_Int32 = "fovScaleFormat"; + public const string k_pch_SteamVR_FovScaleLetterboxed_Bool = "fovScaleLetterboxed"; public const string k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; @@ -7707,7 +8252,6 @@ public static uint GetInitToken() public const string k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; public const string k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; public const string k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; - public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; public const string k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; @@ -7728,6 +8272,10 @@ public static uint GetInitToken() public const string k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility"; public const string k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode"; public const string k_pch_SteamVR_UsePrism_Bool = "usePrism"; + public const string k_pch_SteamVR_AllowFallbackMirrorWindowLinux_Bool = "allowFallbackMirrorWindowLinux"; + public const string k_pch_SteamVR_DisableKeyboardPrivacy_Bool = "disableKeyboardPrivacy"; + public const string k_pch_OpenXR_Section = "openxr"; + public const string k_pch_OpenXR_MetaUnityPluginCompatibility_Int32 = "metaUnityPluginCompatibility"; 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"; @@ -7763,6 +8311,8 @@ public static uint GetInitToken() public const string k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; public const string k_pch_UserInterface_Screenshots_Bool = "screenshots"; public const string k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + public const string k_pch_UserInterface_CheckStatusInterval_Int = "vrmStatusCheckInterval"; + public const string k_pch_UserInterface_CheckForSteam_Bool = "vrmCheckForSteam"; public const string k_pch_Notifications_Section = "notifications"; public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; public const string k_pch_Keyboard_Section = "keyboard"; @@ -7829,19 +8379,24 @@ public static uint GetInitToken() public const string k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; public const string k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; public const string k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; + public const string k_pch_Power_OverrideWindowsPowerScheme_Bool = "overrideWindowsPowerScheme"; public const string k_pch_Dashboard_Section = "dashboard"; public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; public const string k_pch_Dashboard_Position = "position"; - public const string k_pch_Dashboard_DesktopScale = "desktopScale"; public const string k_pch_Dashboard_DashboardScale = "dashboardScale"; public const string k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer"; - public const string k_pch_Dashboard_StickyDashboard = "stickyDashboard"; public const string k_pch_Dashboard_AllowSteamOverlays_Bool = "allowSteamOverlays"; + public const string k_pch_Dashboard_AllowVRGamepadUI_Bool = "allowVRGamepadUI"; + public const string k_pch_Dashboard_SteamMatchesHMDFramerate = "steamMatchesHMDFramerate"; + public const string k_pch_Dashboard_GrabHandleAcceleration = "grabHandleAcceleration"; + public const string k_pch_Dashboard_OverlayBacksideColor_String = "overlayBacksideColor"; public const string k_pch_modelskin_Section = "modelskins"; public const string k_pch_Driver_Enable_Bool = "enable"; public const string k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; public const string k_pch_Driver_LoadPriority_Int32 = "loadPriority"; + public const string k_pch_Driver_Hmd_AllowsClientToControlTextureIndex_Bool = "hmdAllowsClientToControlTextureIndex"; + public const string k_pch_Driver_ForceSystemLayerUseAppPoses_Bool = "forceSystemLayerUseAppPoses"; public const string k_pch_WebInterface_Section = "WebInterface"; public const string k_pch_VRWebHelper_Section = "VRWebHelper"; public const string k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; @@ -7861,12 +8416,16 @@ public static uint GetInitToken() public const string k_pch_LastKnown_Section = "LastKnown"; public const string k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; public const string k_pch_LastKnown_HMDModel_String = "HMDModel"; + public const string k_pch_LastKnown_ActualHMDDriver_String = "ActualHMDDriver"; + public const string k_pch_LastKnown_HMDSerialNumber_String = "HMDSerialNumber"; + public const string k_pch_LastKnown_HMDRemoteClientID_String = "RemoteClientID"; 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 k_pch_GpuSpeed_Section = "GpuSpeed"; + public const string k_pch_XRRenderModelCache_Section = "XRRenderModelUuidCache"; public const string IVRScreenshots_Version = "IVRScreenshots_001"; public const string IVRResources_Version = "IVRResources_001"; public const string IVRDriverManager_Version = "IVRDriverManager_001"; @@ -7877,12 +8436,16 @@ public static uint GetInitToken() public const int k_nActionSetOverlayGlobalPriorityMin = 16777216; public const int k_nActionSetOverlayGlobalPriorityMax = 33554431; public const int k_nActionSetPriorityReservedMin = 33554432; - public const string IVRInput_Version = "IVRInput_010"; + public const string IVRInput_Version = "IVRInput_011"; 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"; + public const string IVRIPCResourceManagerClient_Version = "IVRIPCResourceManagerClient_003"; + public const uint k_nSteamVRVersionMajor = 2; + public const uint k_nSteamVRVersionMinor = 15; + public const uint k_nSteamVRVersionBuild = 6; public const ulong k_ulDisplayRedirectContainer = 25769803779; public const string IVRProperties_Version = "IVRProperties_001"; public const string k_pchPathUserHandRight = "/user/hand/right"; @@ -7928,7 +8491,7 @@ public static uint GetInitToken() public const string k_pchPathUserKeyboard = "/user/keyboard"; public const string k_pchPathClientAppKey = "/client_info/app_key"; public const ulong k_ulInvalidPathHandle = 0; - public const string IVRPaths_Version = "IVRPaths_001"; + public const string IVRPaths_Version = "IVRPaths_002"; public const string IVRBlockQueue_Version = "IVRBlockQueue_005"; static uint VRToken { get; set; } @@ -7949,6 +8512,7 @@ public void Clear() m_pVROverlay = null; m_pVROverlayView = null; m_pVRRenderModels = null; + m_pVRResources = null; m_pVRExtendedDisplay = null; m_pVRSettings = null; m_pVRApplications = null; @@ -8074,6 +8638,19 @@ public CVRRenderModels VRRenderModels() return m_pVRRenderModels; } + public CVRResources VRResources() + { + CheckClear(); + if (m_pVRResources == null) + { + var eError = EVRInitError.None; + var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRResources_Version, ref eError); + if (pInterface != IntPtr.Zero && eError == EVRInitError.None) + m_pVRResources = new CVRResources(pInterface); + } + return m_pVRResources; + } + public CVRExtendedDisplay VRExtendedDisplay() { CheckClear(); @@ -8212,6 +8789,7 @@ public CVRNotifications VRNotifications() private CVROverlay m_pVROverlay; private CVROverlayView m_pVROverlayView; private CVRRenderModels m_pVRRenderModels; + private CVRResources m_pVRResources; private CVRExtendedDisplay m_pVRExtendedDisplay; private CVRSettings m_pVRSettings; private CVRApplications m_pVRApplications; @@ -8243,6 +8821,7 @@ static COpenVRContext OpenVRInternal_ModuleContext public static CVROverlay Overlay { get { return OpenVRInternal_ModuleContext.VROverlay(); } } public static CVROverlayView OverlayView { get { return OpenVRInternal_ModuleContext.VROverlayView(); } } public static CVRRenderModels RenderModels { get { return OpenVRInternal_ModuleContext.VRRenderModels(); } } + public static CVRResources Resources { get { return OpenVRInternal_ModuleContext.VRResources(); } } public static CVRExtendedDisplay ExtendedDisplay { get { return OpenVRInternal_ModuleContext.VRExtendedDisplay(); } } public static CVRSettings Settings { get { return OpenVRInternal_ModuleContext.VRSettings(); } } public static CVRApplications Applications { get { return OpenVRInternal_ModuleContext.VRApplications(); } } @@ -8258,6 +8837,8 @@ static COpenVRContext OpenVRInternal_ModuleContext /** Finds the active installation of vrclient.dll and initializes it */ public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "") { + CVRSystem pSystem = null; + try { VRToken = InitInternal2(ref peError, eApplicationType, pchStartupInfo); @@ -8269,18 +8850,24 @@ public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eAppli OpenVRInternal_ModuleContext.Clear(); - if (peError != EVRInitError.None) - return null; + if (peError == EVRInitError.None && !IsInterfaceVersionValid(IVRSystem_Version)) + { + peError = EVRInitError.Init_InterfaceNotFound; + } + + if (peError == EVRInitError.None) + { + pSystem = OpenVR.System; + peError = pSystem.SetSDKVersion(k_nSteamVRVersionMajor, k_nSteamVRVersionMinor, k_nSteamVRVersionBuild); + } - bool bInterfaceValid = IsInterfaceVersionValid(IVRSystem_Version); - if (!bInterfaceValid) + if (peError != EVRInitError.None) { + pSystem = null; ShutdownInternal(); - peError = EVRInitError.Init_InterfaceNotFound; - return null; } - return OpenVR.System; + return pSystem; } /** unloads vrclient.dll. Any interface pointers from the interface are diff --git a/third-party/openvr/headers/openvr_api.json b/third-party/openvr/headers/openvr_api.json index 41a1380c..6e0be006 100644 --- a/third-party/openvr/headers/openvr_api.json +++ b/third-party/openvr/headers/openvr_api.json @@ -15,6 +15,7 @@ ,{"typedef": "vr::VRActionHandle_t","type": "uint64_t"} ,{"typedef": "vr::VRActionSetHandle_t","type": "uint64_t"} ,{"typedef": "vr::VRInputValueHandle_t","type": "uint64_t"} +,{"typedef": "vr::VRInputComponentHandle_t","type": "uint64_t"} ,{"typedef": "vr::VREvent_Data_t","type": "union VREvent_Data_t"} ,{"typedef": "vr::VRComponentProperties","type": "uint32_t"} ,{"typedef": "vr::VRControllerState_t","type": "struct vr::VRControllerState001_t"} @@ -58,6 +59,8 @@ ,{"name": "TextureType_DirectX12","value": "4"} ,{"name": "TextureType_DXGISharedHandle","value": "5"} ,{"name": "TextureType_Metal","value": "6"} + ,{"name": "TextureType_Reserved","value": "7"} + ,{"name": "TextureType_SharedTextureHandle","value": "8"} ]} , {"enumname": "vr::EColorSpace","values": [ {"name": "ColorSpace_Auto","value": "0"} @@ -157,12 +160,19 @@ ,{"name": "Prop_EstimatedDeviceFirstUseTime_Int32","value": "1051"} ,{"name": "Prop_DevicePowerUsage_Float","value": "1052"} ,{"name": "Prop_IgnoreMotionForStandby_Bool","value": "1053"} + ,{"name": "Prop_ActualTrackingSystemName_String","value": "1054"} + ,{"name": "Prop_AllowCameraToggle_Bool","value": "1055"} + ,{"name": "Prop_AllowLightSourceFrequency_Bool","value": "1056"} + ,{"name": "Prop_SteamRemoteClientID_Uint64","value": "1057"} + ,{"name": "Prop_Reserved_1058","value": "1058"} + ,{"name": "Prop_Reserved_1059","value": "1059"} + ,{"name": "Prop_Reserved_1060","value": "1060"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} ,{"name": "Prop_UserIpdMeters_Float","value": "2003"} ,{"name": "Prop_CurrentUniverseId_Uint64","value": "2004"} - ,{"name": "Prop_PreviousUniverseId_Uint64","value": "2005"} + ,{"name": "Prop_PreviousUniverseId_Uint64_deprecated","value": "0"} ,{"name": "Prop_DisplayFirmwareVersion_Uint64","value": "2006"} ,{"name": "Prop_IsOnDesktop_Bool","value": "2007"} ,{"name": "Prop_DisplayMCType_Int32","value": "2008"} @@ -245,10 +255,12 @@ ,{"name": "Prop_CameraExposureTime_Float","value": "2088"} ,{"name": "Prop_CameraGlobalGain_Float","value": "2089"} ,{"name": "Prop_DashboardScale_Float","value": "2091"} - ,{"name": "Prop_PeerButtonInfo_String","value": "2092"} ,{"name": "Prop_Hmd_SupportsHDR10_Bool","value": "2093"} ,{"name": "Prop_Hmd_EnableParallelRenderCameras_Bool","value": "2094"} ,{"name": "Prop_DriverProvidedChaperoneJson_String","value": "2095"} + ,{"name": "Prop_ForceSystemLayerUseAppPoses_Bool","value": "2096"} + ,{"name": "Prop_DashboardLinkSupport_Int32","value": "2097"} + ,{"name": "Prop_DisplayMinUIAnalogGain_Float","value": "2098"} ,{"name": "Prop_IpdUIRangeMinMeters_Float","value": "2100"} ,{"name": "Prop_IpdUIRangeMaxMeters_Float","value": "2101"} ,{"name": "Prop_Hmd_SupportsHDCP14LegacyCompat_Bool","value": "2102"} @@ -257,9 +269,15 @@ ,{"name": "Prop_Hmd_SupportsRoomViewDirect_Bool","value": "2105"} ,{"name": "Prop_Hmd_SupportsAppThrottling_Bool","value": "2106"} ,{"name": "Prop_Hmd_SupportsGpuBusMonitoring_Bool","value": "2107"} - ,{"name": "Prop_DSCVersion_Int32","value": "2110"} - ,{"name": "Prop_DSCSliceCount_Int32","value": "2111"} - ,{"name": "Prop_DSCBPPx16_Int32","value": "2112"} + ,{"name": "Prop_DriverDisplaysIPDChanges_Bool","value": "2108"} + ,{"name": "Prop_Reserved_2110","value": "2110"} + ,{"name": "Prop_Reserved_2111","value": "2111"} + ,{"name": "Prop_Reserved_2112","value": "2112"} + ,{"name": "Prop_Hmd_MaxDistortedTextureWidth_Int32","value": "2113"} + ,{"name": "Prop_Hmd_MaxDistortedTextureHeight_Int32","value": "2114"} + ,{"name": "Prop_Hmd_AllowSupersampleFiltering_Bool","value": "2115"} + ,{"name": "Prop_Hmd_AllowsClientToControlTextureIndex","value": "2116"} + ,{"name": "Prop_Reserved_2117","value": "2117"} ,{"name": "Prop_DriverRequestedMuraCorrectionMode_Int32","value": "2200"} ,{"name": "Prop_DriverRequestedMuraFeather_InnerLeft_Int32","value": "2201"} ,{"name": "Prop_DriverRequestedMuraFeather_InnerRight_Int32","value": "2202"} @@ -273,6 +291,14 @@ ,{"name": "Prop_Audio_DefaultRecordingDeviceId_String","value": "2301"} ,{"name": "Prop_Audio_DefaultPlaybackDeviceVolume_Float","value": "2302"} ,{"name": "Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool","value": "2303"} + ,{"name": "Prop_Audio_DriverManagesPlaybackVolumeControl_Bool","value": "2304"} + ,{"name": "Prop_Audio_DriverPlaybackVolume_Float","value": "2305"} + ,{"name": "Prop_Audio_DriverPlaybackMute_Bool","value": "2306"} + ,{"name": "Prop_Audio_DriverManagesRecordingVolumeControl_Bool","value": "2307"} + ,{"name": "Prop_Audio_DriverRecordingVolume_Float","value": "2308"} + ,{"name": "Prop_Audio_DriverRecordingMute_Bool","value": "2309"} + ,{"name": "Prop_Audio_PipewirePlaybackNode_Int32","value": "2400"} + ,{"name": "Prop_Audio_PipewireRecordingNode_Int32","value": "2401"} ,{"name": "Prop_AttachedDeviceId_String","value": "3000"} ,{"name": "Prop_SupportedButtons_Uint64","value": "3001"} ,{"name": "Prop_Axis0Type_Int32","value": "3002"} @@ -312,10 +338,19 @@ ,{"name": "Prop_HasDriverDirectModeComponent_Bool","value": "6005"} ,{"name": "Prop_HasVirtualDisplayComponent_Bool","value": "6006"} ,{"name": "Prop_HasSpatialAnchorsSupport_Bool","value": "6007"} + ,{"name": "Prop_SupportsXrTextureSets_Bool","value": "6008"} + ,{"name": "Prop_SupportsXrEyeGazeInteraction_Bool","value": "6009"} + ,{"name": "Prop_DeviceHasNoIMU_Bool","value": "6010"} + ,{"name": "Prop_UseAdvancedPrediction_Bool","value": "6011"} ,{"name": "Prop_ControllerType_String","value": "7000"} ,{"name": "Prop_ControllerHandSelectionPriority_Int32","value": "7002"} ,{"name": "Prop_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "Prop_VendorSpecific_Reserved_End","value": "10999"} + ,{"name": "Prop_Reserved_11000","value": "11000"} + ,{"name": "Prop_Reserved_11001","value": "11001"} + ,{"name": "Prop_Reserved_11002","value": "11002"} + ,{"name": "Prop_Reserved_11003","value": "11003"} + ,{"name": "Prop_Reserved_11004","value": "11004"} ,{"name": "Prop_TrackedDeviceProperty_Max","value": "1000000"} ]} , {"enumname": "vr::ETrackedPropertyError","values": [ @@ -349,11 +384,16 @@ ,{"name": "Submit_Reserved","value": "4"} ,{"name": "Submit_TextureWithPose","value": "8"} ,{"name": "Submit_TextureWithDepth","value": "16"} - ,{"name": "Submit_FrameDiscontinuty","value": "32"} + ,{"name": "Submit_FrameDiscontinuity","value": "32"} ,{"name": "Submit_VulkanTextureWithArrayData","value": "64"} ,{"name": "Submit_GlArrayTexture","value": "128"} + ,{"name": "Submit_IsEgl","value": "256"} + ,{"name": "Submit_TextureWithMotion","value": "536"} ,{"name": "Submit_Reserved2","value": "32768"} ,{"name": "Submit_Reserved3","value": "65536"} + ,{"name": "Submit_Reserved4","value": "131072"} + ,{"name": "Submit_Reserved5","value": "262144"} + ,{"name": "Submit_Reserved6","value": "524288"} ]} , {"enumname": "vr::EVRState","values": [ {"name": "VRState_Undefined","value": "-1"} @@ -382,6 +422,8 @@ ,{"name": "VREvent_PropertyChanged","value": "111"} ,{"name": "VREvent_WirelessDisconnect","value": "112"} ,{"name": "VREvent_WirelessReconnect","value": "113"} + ,{"name": "VREvent_Reserved_0114","value": "114"} + ,{"name": "VREvent_Reserved_0115","value": "115"} ,{"name": "VREvent_ButtonPress","value": "200"} ,{"name": "VREvent_ButtonUnpress","value": "201"} ,{"name": "VREvent_ButtonTouch","value": "202"} @@ -415,7 +457,6 @@ ,{"name": "VREvent_OverlayHidden","value": "501"} ,{"name": "VREvent_DashboardActivated","value": "502"} ,{"name": "VREvent_DashboardDeactivated","value": "503"} - ,{"name": "VREvent_DashboardRequested","value": "505"} ,{"name": "VREvent_ResetDashboard","value": "506"} ,{"name": "VREvent_ImageLoaded","value": "508"} ,{"name": "VREvent_ShowKeyboard","value": "509"} @@ -442,6 +483,20 @@ ,{"name": "VREvent_StartDashboard","value": "532"} ,{"name": "VREvent_ElevatePrism","value": "533"} ,{"name": "VREvent_OverlayClosed","value": "534"} + ,{"name": "VREvent_DashboardThumbChanged","value": "535"} + ,{"name": "VREvent_DesktopMightBeVisible","value": "536"} + ,{"name": "VREvent_DesktopMightBeHidden","value": "537"} + ,{"name": "VREvent_MutualSteamCapabilitiesChanged","value": "538"} + ,{"name": "VREvent_OverlayCreated","value": "539"} + ,{"name": "VREvent_OverlayDestroyed","value": "540"} + ,{"name": "VREvent_OverlayNameChanged","value": "544"} + ,{"name": "VREvent_TrackingRecordingStarted","value": "541"} + ,{"name": "VREvent_TrackingRecordingStopped","value": "542"} + ,{"name": "VREvent_SetTrackingRecordingPath","value": "543"} + ,{"name": "VREvent_Reserved_0560","value": "560"} + ,{"name": "VREvent_Reserved_0561","value": "561"} + ,{"name": "VREvent_Reserved_0562","value": "562"} + ,{"name": "VREvent_Reserved_0563","value": "563"} ,{"name": "VREvent_Notification_Shown","value": "600"} ,{"name": "VREvent_Notification_Hidden","value": "601"} ,{"name": "VREvent_Notification_BeginInteraction","value": "602"} @@ -452,6 +507,7 @@ ,{"name": "VREvent_DriverRequestedQuit","value": "704"} ,{"name": "VREvent_RestartRequested","value": "705"} ,{"name": "VREvent_InvalidateSwapTextureSets","value": "706"} + ,{"name": "VREvent_RequestDisconnectWirelessHMD","value": "707"} ,{"name": "VREvent_ChaperoneDataHasChanged","value": "800"} ,{"name": "VREvent_ChaperoneUniverseHasChanged","value": "801"} ,{"name": "VREvent_ChaperoneTempDataHasChanged","value": "802"} @@ -459,8 +515,14 @@ ,{"name": "VREvent_SeatedZeroPoseReset","value": "804"} ,{"name": "VREvent_ChaperoneFlushCache","value": "805"} ,{"name": "VREvent_ChaperoneRoomSetupStarting","value": "806"} - ,{"name": "VREvent_ChaperoneRoomSetupFinished","value": "807"} + ,{"name": "VREvent_ChaperoneRoomSetupCommitted","value": "807"} ,{"name": "VREvent_StandingZeroPoseReset","value": "808"} + ,{"name": "VREvent_Reserved_0809","value": "809"} + ,{"name": "VREvent_Reserved_0810","value": "810"} + ,{"name": "VREvent_Reserved_0811","value": "811"} + ,{"name": "VREvent_Reserved_0812","value": "812"} + ,{"name": "VREvent_Reserved_0813","value": "813"} + ,{"name": "VREvent_Reserved_0814","value": "814"} ,{"name": "VREvent_AudioSettingsHaveChanged","value": "820"} ,{"name": "VREvent_BackgroundSettingHasChanged","value": "850"} ,{"name": "VREvent_CameraSettingsHaveChanged","value": "851"} @@ -484,6 +546,8 @@ ,{"name": "VREvent_GpuSpeedSectionSettingChanged","value": "869"} ,{"name": "VREvent_WindowsMRSectionSettingChanged","value": "870"} ,{"name": "VREvent_OtherSectionSettingChanged","value": "871"} + ,{"name": "VREvent_AnyDriverSettingsChanged","value": "872"} + ,{"name": "VREvent_Reserved_0873","value": "873"} ,{"name": "VREvent_StatusUpdate","value": "900"} ,{"name": "VREvent_WebInterface_InstallDriverCompleted","value": "950"} ,{"name": "VREvent_MCImageUpdated","value": "1000"} @@ -492,6 +556,8 @@ ,{"name": "VREvent_KeyboardClosed","value": "1200"} ,{"name": "VREvent_KeyboardCharInput","value": "1201"} ,{"name": "VREvent_KeyboardDone","value": "1202"} + ,{"name": "VREvent_KeyboardOpened_Global","value": "1203"} + ,{"name": "VREvent_KeyboardClosed_Global","value": "1204"} ,{"name": "VREvent_ApplicationListUpdated","value": "1303"} ,{"name": "VREvent_ApplicationMimeTypeLoad","value": "1304"} ,{"name": "VREvent_ProcessConnected","value": "1306"} @@ -533,6 +599,11 @@ ,{"name": "VREvent_SystemReport_Started","value": "1900"} ,{"name": "VREvent_Monitor_ShowHeadsetView","value": "2000"} ,{"name": "VREvent_Monitor_HideHeadsetView","value": "2001"} + ,{"name": "VREvent_Audio_SetSpeakersVolume","value": "2100"} + ,{"name": "VREvent_Audio_SetSpeakersMute","value": "2101"} + ,{"name": "VREvent_Audio_SetMicrophoneVolume","value": "2102"} + ,{"name": "VREvent_Audio_SetMicrophoneMute","value": "2103"} + ,{"name": "VREvent_RenderModel_CountChanged","value": "2200"} ,{"name": "VREvent_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "VREvent_VendorSpecific_Reserved_End","value": "19999"} ]} @@ -716,6 +787,7 @@ ,{"name": "VRNotificationError_NotificationQueueFull","value": "101"} ,{"name": "VRNotificationError_InvalidOverlayHandle","value": "102"} ,{"name": "VRNotificationError_SystemWithUserValueAlreadyExists","value": "103"} + ,{"name": "VRNotificationError_ServiceUnavailable","value": "104"} ]} , {"enumname": "vr::EVRSkeletalMotionRange","values": [ {"name": "VRSkeletalMotionRange_WithController","value": "0"} @@ -799,6 +871,8 @@ ,{"name": "VRInitError_Init_VRDashboardTokenFailure","value": "165"} ,{"name": "VRInitError_Init_VRDashboardEnvironmentFailure","value": "166"} ,{"name": "VRInitError_Init_VRDashboardPathFailure","value": "167"} + ,{"name": "VRInitError_Init_InstallationTooOld","value": "168"} + ,{"name": "VRInitError_Init_ClientVersionAlreadyProvided","value": "169"} ,{"name": "VRInitError_Driver_Failed","value": "200"} ,{"name": "VRInitError_Driver_Unknown","value": "201"} ,{"name": "VRInitError_Driver_HmdUnknown","value": "202"} @@ -921,6 +995,11 @@ ,{"name": "VRInitError_Compositor_SystemLayerCreateSession","value": "493"} ,{"name": "VRInitError_Compositor_CreateInverseDistortUVs","value": "494"} ,{"name": "VRInitError_Compositor_CreateBackbufferDepth","value": "495"} + ,{"name": "VRInitError_Compositor_CannotDRMLeaseDisplay","value": "496"} + ,{"name": "VRInitError_Compositor_CannotConnectToDisplayServer","value": "497"} + ,{"name": "VRInitError_Compositor_GnomeNoDRMLeasing","value": "498"} + ,{"name": "VRInitError_Compositor_FailedToInitializeEncoder","value": "499"} + ,{"name": "VRInitError_Compositor_CreateBlurTexture","value": "500"} ,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"} ,{"name": "VRInitError_VendorSpecific_WindowsNotInDevMode","value": "1001"} ,{"name": "VRInitError_VendorSpecific_OculusLinkNotEnabled","value": "1002"} @@ -939,6 +1018,10 @@ ,{"name": "VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck","value": "1113"} ,{"name": "VRInitError_VendorSpecific_OculusRuntimeBadInstall","value": "1114"} ,{"name": "VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1","value": "1115"} + ,{"name": "VRInitError_VendorSpecific_Oasis_UnlockRequired","value": "1150"} + ,{"name": "VRInitError_VendorSpecific_VRLink_OutdatedDriverMESA","value": "1200"} + ,{"name": "VRInitError_VendorSpecific_VRLink_OutdatedDriverNVIDIA","value": "1201"} + ,{"name": "VRInitError_VendorSpecific_VRLink_NoVideoSupport","value": "1202"} ,{"name": "VRInitError_Steam_SteamInstallationNotFound","value": "2000"} ,{"name": "VRInitError_LastError","value": "2001"} ]} @@ -1008,6 +1091,15 @@ ,{"name": "OffScale_GyroY","value": "16"} ,{"name": "OffScale_GyroZ","value": "32"} ]} +, {"enumname": "vr::EVRDistortionChannel","values": [ + {"name": "Red","value": "0"} + ,{"name": "Green","value": "1"} + ,{"name": "Blue","value": "2"} + ,{"name": "InverseRed","value": "3"} + ,{"name": "InverseGreen","value": "4"} + ,{"name": "InverseBlue","value": "5"} + ,{"name": "Count","value": "6"} +]} , {"enumname": "vr::EVRApplicationError","values": [ {"name": "VRApplicationError_None","value": "0"} ,{"name": "VRApplicationError_AppKeyAlreadyExists","value": "100"} @@ -1026,6 +1118,7 @@ ,{"name": "VRApplicationError_TransitionAborted","value": "113"} ,{"name": "VRApplicationError_IsTemplate","value": "114"} ,{"name": "VRApplicationError_SteamVRIsExiting","value": "115"} + ,{"name": "VRApplicationError_WaitingForChaperone","value": "116"} ,{"name": "VRApplicationError_BufferTooSmall","value": "200"} ,{"name": "VRApplicationError_PropertyNotSet","value": "201"} ,{"name": "VRApplicationError_UnknownProperty","value": "202"} @@ -1042,6 +1135,7 @@ ,{"name": "VRApplicationProperty_Description_String","value": "50"} ,{"name": "VRApplicationProperty_NewsURL_String","value": "51"} ,{"name": "VRApplicationProperty_ImagePath_String","value": "52"} + ,{"name": "VRApplicationProperty_ImagePathCapsule_String","value": "55"} ,{"name": "VRApplicationProperty_Source_String","value": "53"} ,{"name": "VRApplicationProperty_ActionManifestURL_String","value": "54"} ,{"name": "VRApplicationProperty_IsDashboardOverlay_Bool","value": "60"} @@ -1093,6 +1187,11 @@ ,{"name": "VRCompositorError_InvalidBounds","value": "109"} ,{"name": "VRCompositorError_AlreadySet","value": "110"} ]} +, {"enumname": "vr::EVRCompositorTextureUsage","values": [ + {"name": "VRCompositorTextureUsage_Left","value": "0"} + ,{"name": "VRCompositorTextureUsage_Right","value": "1"} + ,{"name": "VRCompositorTextureUsage_Both","value": "2"} +]} , {"enumname": "vr::EVRCompositorTimingMode","values": [ {"name": "VRCompositorTimingMode_Implicit","value": "0"} ,{"name": "VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff","value": "1"} @@ -1133,7 +1232,13 @@ ,{"name": "VROverlayFlags_WantsModalBehavior","value": "1048576"} ,{"name": "VROverlayFlags_IsPremultiplied","value": "2097152"} ,{"name": "VROverlayFlags_IgnoreTextureAlpha","value": "4194304"} - ,{"name": "VROverlayFlags_Reserved","value": "67108864"} + ,{"name": "VROverlayFlags_EnableControlBar","value": "8388608"} + ,{"name": "VROverlayFlags_EnableControlBarKeyboard","value": "16777216"} + ,{"name": "VROverlayFlags_EnableControlBarClose","value": "33554432"} + ,{"name": "VROverlayFlags_MinimalControlBar","value": "67108864"} + ,{"name": "VROverlayFlags_EnableClickStabilization","value": "134217728"} + ,{"name": "VROverlayFlags_MultiCursor","value": "268435456"} + ,{"name": "VROverlayFlags_NoBackside","value": "536870912"} ]} , {"enumname": "vr::VRMessageOverlayResponse","values": [ {"name": "VRMessageOverlayResponse_ButtonPress_0","value": "0"} @@ -1160,6 +1265,8 @@ , {"enumname": "vr::EKeyboardFlags","values": [ {"name": "KeyboardFlag_Minimal","value": "1"} ,{"name": "KeyboardFlag_Modal","value": "2"} + ,{"name": "KeyboardFlag_ShowArrowKeys","value": "4"} + ,{"name": "KeyboardFlag_HideDoneKey","value": "8"} ]} , {"enumname": "vr::EDeviceType","values": [ {"name": "DeviceType_Invalid","value": "-1"} @@ -1213,6 +1320,7 @@ ,{"name": "VRSettingsError_ReadFailed","value": "3"} ,{"name": "VRSettingsError_JsonParseFailed","value": "4"} ,{"name": "VRSettingsError_UnsetSettingHasNoDefault","value": "5"} + ,{"name": "VRSettingsError_AccessDenied","value": "6"} ]} , {"enumname": "vr::EVRScreenshotError","values": [ {"name": "VRScreenshotError_None","value": "0"} @@ -1307,6 +1415,8 @@ ]} ], "consts":[{ + "constname": "MaxDmabufPlaneCount","consttype": "const uint32_t", "constval": "4"} +,{ "constname": "k_nDriverNone","consttype": "const uint32_t", "constval": "4294967295"} ,{ "constname": "k_unMaxDriverDebugResponseSize","consttype": "const uint32_t", "constval": "32768"} @@ -1382,6 +1492,8 @@ "constname": "k_ulInvalidActionSetHandle","consttype": "const VRActionSetHandle_t", "constval": "0"} ,{ "constname": "k_ulInvalidInputValueHandle","consttype": "const VRInputValueHandle_t", "constval": "0"} +,{ + "constname": "k_ulInvalidInputComponentHandle","consttype": "const VRInputComponentHandle_t", "constval": "0"} ,{ "constname": "k_unControllerStateAxisCount","consttype": "const uint32_t", "constval": "5"} ,{ @@ -1391,7 +1503,7 @@ ,{ "constname": "k_unScreenshotHandleInvalid","consttype": "const uint32_t", "constval": "0"} ,{ - "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_022"} + "constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_026"} ,{ "constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"} ,{ @@ -1403,13 +1515,13 @@ ,{ "constname": "k_pch_MimeType_GameTheater","consttype": "const char *const", "constval": "vr/game_theater"} ,{ - "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_007"} + "constname": "IVRApplications_Version","consttype": "const char *const", "constval": "IVRApplications_008"} ,{ "constname": "IVRChaperone_Version","consttype": "const char *const", "constval": "IVRChaperone_004"} ,{ "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_006"} ,{ - "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_027"} + "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_029"} ,{ "constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ @@ -1419,7 +1531,7 @@ ,{ "constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_027"} + "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_028"} ,{ "constname": "IVROverlayView_Version","consttype": "const char *const", "constval": "IVROverlayView_003"} ,{ @@ -1436,8 +1548,14 @@ "constname": "k_pch_Controller_Component_Base","consttype": "const char *const", "constval": "base"} ,{ "constname": "k_pch_Controller_Component_Tip","consttype": "const char *const", "constval": "tip"} +,{ + "constname": "k_pch_Controller_Component_OpenXR_Aim","consttype": "const char *const", "constval": "openxr_aim"} ,{ "constname": "k_pch_Controller_Component_HandGrip","consttype": "const char *const", "constval": "handgrip"} +,{ + "constname": "k_pch_Controller_Component_OpenXR_Grip","consttype": "const char *const", "constval": "openxr_grip"} +,{ + "constname": "k_pch_Controller_Component_OpenXR_HandModel","consttype": "const char *const", "constval": "openxr_handmodel"} ,{ "constname": "k_pch_Controller_Component_Status","consttype": "const char *const", "constval": "status"} ,{ @@ -1452,6 +1570,8 @@ "constname": "IVRSettings_Version","consttype": "const char *const", "constval": "IVRSettings_003"} ,{ "constname": "k_pch_SteamVR_Section","consttype": "const char *const", "constval": "steamvr"} +,{ + "constname": "k_pch_SteamVR_Contrast_Float","consttype": "const char *const", "constval": "contrast"} ,{ "constname": "k_pch_SteamVR_RequireHmd_String","consttype": "const char *const", "constval": "requireHmd"} ,{ @@ -1486,6 +1606,8 @@ "constname": "k_pch_SteamVR_PlayAreaColor_String","consttype": "const char *const", "constval": "playAreaColor"} ,{ "constname": "k_pch_SteamVR_TrackingLossColor_String","consttype": "const char *const", "constval": "trackingLossColor"} +,{ + "constname": "k_pch_SteamVR_StartColor_String","consttype": "const char *const", "constval": "startColor"} ,{ "constname": "k_pch_SteamVR_ShowStage_Bool","consttype": "const char *const", "constval": "showStage"} ,{ @@ -1510,6 +1632,10 @@ "constname": "k_pch_SteamVR_MotionSmoothing_Bool","consttype": "const char *const", "constval": "motionSmoothing"} ,{ "constname": "k_pch_SteamVR_MotionSmoothingOverride_Int32","consttype": "const char *const", "constval": "motionSmoothingOverride"} +,{ + "constname": "k_pch_SteamVR_FoveatedSharpening_Bool","consttype": "const char *const", "constval": "sharpening"} +,{ + "constname": "k_pch_SteamVR_FoveatedSharpeningOverride_Int32","consttype": "const char *const", "constval": "sharpeningOverride"} ,{ "constname": "k_pch_SteamVR_FramesToThrottle_Int32","consttype": "const char *const", "constval": "framesToThrottle"} ,{ @@ -1518,6 +1644,16 @@ "constname": "k_pch_SteamVR_WorldScale_Float","consttype": "const char *const", "constval": "worldScale"} ,{ "constname": "k_pch_SteamVR_FovScale_Int32","consttype": "const char *const", "constval": "fovScale"} +,{ + "constname": "k_pch_SteamVR_FovScaleInner_Int32","consttype": "const char *const", "constval": "fovScaleInner"} +,{ + "constname": "k_pch_SteamVR_FovScaleUpper_Int32","consttype": "const char *const", "constval": "fovScaleUpper"} +,{ + "constname": "k_pch_SteamVR_FovScaleLower_Int32","consttype": "const char *const", "constval": "fovScaleLower"} +,{ + "constname": "k_pch_SteamVR_FovScaleFormat_Int32","consttype": "const char *const", "constval": "fovScaleFormat"} +,{ + "constname": "k_pch_SteamVR_FovScaleLetterboxed_Bool","consttype": "const char *const", "constval": "fovScaleLetterboxed"} ,{ "constname": "k_pch_SteamVR_DisableAsyncReprojection_Bool","consttype": "const char *const", "constval": "disableAsync"} ,{ @@ -1564,8 +1700,6 @@ "constname": "k_pch_SteamVR_AllowDisplayLockedMode_Bool","consttype": "const char *const", "constval": "allowDisplayLockedMode"} ,{ "constname": "k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool","consttype": "const char *const", "constval": "haveStartedTutorialForNativeChaperoneDriver"} -,{ - "constname": "k_pch_SteamVR_ForceWindows32bitVRMonitor","consttype": "const char *const", "constval": "forceWindows32BitVRMonitor"} ,{ "constname": "k_pch_SteamVR_DebugInputBinding","consttype": "const char *const", "constval": "debugInputBinding"} ,{ @@ -1606,6 +1740,14 @@ "constname": "k_pch_SteamVR_DisplayPortTrainingMode_Int","consttype": "const char *const", "constval": "displayPortTrainingMode"} ,{ "constname": "k_pch_SteamVR_UsePrism_Bool","consttype": "const char *const", "constval": "usePrism"} +,{ + "constname": "k_pch_SteamVR_AllowFallbackMirrorWindowLinux_Bool","consttype": "const char *const", "constval": "allowFallbackMirrorWindowLinux"} +,{ + "constname": "k_pch_SteamVR_DisableKeyboardPrivacy_Bool","consttype": "const char *const", "constval": "disableKeyboardPrivacy"} +,{ + "constname": "k_pch_OpenXR_Section","consttype": "const char *const", "constval": "openxr"} +,{ + "constname": "k_pch_OpenXR_MetaUnityPluginCompatibility_Int32","consttype": "const char *const", "constval": "metaUnityPluginCompatibility"} ,{ "constname": "k_pch_DirectMode_Section","consttype": "const char *const", "constval": "direct_mode"} ,{ @@ -1676,6 +1818,10 @@ "constname": "k_pch_UserInterface_Screenshots_Bool","consttype": "const char *const", "constval": "screenshots"} ,{ "constname": "k_pch_UserInterface_ScreenshotType_Int","consttype": "const char *const", "constval": "screenshotType"} +,{ + "constname": "k_pch_UserInterface_CheckStatusInterval_Int","consttype": "const char *const", "constval": "vrmStatusCheckInterval"} +,{ + "constname": "k_pch_UserInterface_CheckForSteam_Bool","consttype": "const char *const", "constval": "vrmCheckForSteam"} ,{ "constname": "k_pch_Notifications_Section","consttype": "const char *const", "constval": "notifications"} ,{ @@ -1808,6 +1954,8 @@ "constname": "k_pch_Power_AutoLaunchSteamVROnButtonPress","consttype": "const char *const", "constval": "autoLaunchSteamVROnButtonPress"} ,{ "constname": "k_pch_Power_PauseCompositorOnStandby_Bool","consttype": "const char *const", "constval": "pauseCompositorOnStandby"} +,{ + "constname": "k_pch_Power_OverrideWindowsPowerScheme_Bool","consttype": "const char *const", "constval": "overrideWindowsPowerScheme"} ,{ "constname": "k_pch_Dashboard_Section","consttype": "const char *const", "constval": "dashboard"} ,{ @@ -1816,16 +1964,20 @@ "constname": "k_pch_Dashboard_ArcadeMode_Bool","consttype": "const char *const", "constval": "arcadeMode"} ,{ "constname": "k_pch_Dashboard_Position","consttype": "const char *const", "constval": "position"} -,{ - "constname": "k_pch_Dashboard_DesktopScale","consttype": "const char *const", "constval": "desktopScale"} ,{ "constname": "k_pch_Dashboard_DashboardScale","consttype": "const char *const", "constval": "dashboardScale"} ,{ "constname": "k_pch_Dashboard_UseStandaloneSystemLayer","consttype": "const char *const", "constval": "standaloneSystemLayer"} -,{ - "constname": "k_pch_Dashboard_StickyDashboard","consttype": "const char *const", "constval": "stickyDashboard"} ,{ "constname": "k_pch_Dashboard_AllowSteamOverlays_Bool","consttype": "const char *const", "constval": "allowSteamOverlays"} +,{ + "constname": "k_pch_Dashboard_AllowVRGamepadUI_Bool","consttype": "const char *const", "constval": "allowVRGamepadUI"} +,{ + "constname": "k_pch_Dashboard_SteamMatchesHMDFramerate","consttype": "const char *const", "constval": "steamMatchesHMDFramerate"} +,{ + "constname": "k_pch_Dashboard_GrabHandleAcceleration","consttype": "const char *const", "constval": "grabHandleAcceleration"} +,{ + "constname": "k_pch_Dashboard_OverlayBacksideColor_String","consttype": "const char *const", "constval": "overlayBacksideColor"} ,{ "constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"} ,{ @@ -1834,6 +1986,10 @@ "constname": "k_pch_Driver_BlockedBySafemode_Bool","consttype": "const char *const", "constval": "blocked_by_safe_mode"} ,{ "constname": "k_pch_Driver_LoadPriority_Int32","consttype": "const char *const", "constval": "loadPriority"} +,{ + "constname": "k_pch_Driver_Hmd_AllowsClientToControlTextureIndex_Bool","consttype": "const char *const", "constval": "hmdAllowsClientToControlTextureIndex"} +,{ + "constname": "k_pch_Driver_ForceSystemLayerUseAppPoses_Bool","consttype": "const char *const", "constval": "forceSystemLayerUseAppPoses"} ,{ "constname": "k_pch_WebInterface_Section","consttype": "const char *const", "constval": "WebInterface"} ,{ @@ -1872,6 +2028,12 @@ "constname": "k_pch_LastKnown_HMDManufacturer_String","consttype": "const char *const", "constval": "HMDManufacturer"} ,{ "constname": "k_pch_LastKnown_HMDModel_String","consttype": "const char *const", "constval": "HMDModel"} +,{ + "constname": "k_pch_LastKnown_ActualHMDDriver_String","consttype": "const char *const", "constval": "ActualHMDDriver"} +,{ + "constname": "k_pch_LastKnown_HMDSerialNumber_String","consttype": "const char *const", "constval": "HMDSerialNumber"} +,{ + "constname": "k_pch_LastKnown_HMDRemoteClientID_String","consttype": "const char *const", "constval": "RemoteClientID"} ,{ "constname": "k_pch_DismissedWarnings_Section","consttype": "const char *const", "constval": "DismissedWarnings"} ,{ @@ -1884,6 +2046,8 @@ "constname": "k_pch_Input_ThumbstickDeadzone_Float","consttype": "const char *const", "constval": "thumbstickDeadzone"} ,{ "constname": "k_pch_GpuSpeed_Section","consttype": "const char *const", "constval": "GpuSpeed"} +,{ + "constname": "k_pch_XRRenderModelCache_Section","consttype": "const char *const", "constval": "XRRenderModelUuidCache"} ,{ "constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"} ,{ @@ -1905,109 +2069,117 @@ ,{ "constname": "k_nActionSetPriorityReservedMin","consttype": "const int32_t", "constval": "33554432"} ,{ - "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_010"} + "constname": "IVRInput_Version","consttype": "const char *const", "constval": "IVRInput_011"} ,{ "constname": "k_ulInvalidIOBufferHandle","consttype": "const uint64_t", "constval": "0"} ,{ - "constname": "IVRIOBuffer_Version","consttype": "const char *", "constval": "IVRIOBuffer_002"} + "constname": "IVRIOBuffer_Version","consttype": "const char *const", "constval": "IVRIOBuffer_002"} ,{ "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"} +,{ + "constname": "IVRIPCResourceManagerClient_Version","consttype": "const char *", "constval": "IVRIPCResourceManagerClient_003"} +,{ + "constname": "k_nSteamVRVersionMajor","consttype": "const uint32_t", "constval": "2"} +,{ + "constname": "k_nSteamVRVersionMinor","consttype": "const uint32_t", "constval": "15"} +,{ + "constname": "k_nSteamVRVersionBuild","consttype": "const uint32_t", "constval": "6"} ,{ "constname": "k_ulDisplayRedirectContainer","consttype": "const PropertyContainerHandle_t", "constval": "25769803779"} ,{ "constname": "IVRProperties_Version","consttype": "const char *const", "constval": "IVRProperties_001"} ,{ - "constname": "k_pchPathUserHandRight","consttype": "const char *", "constval": "/user/hand/right"} + "constname": "k_pchPathUserHandRight","consttype": "const char *const", "constval": "/user/hand/right"} ,{ - "constname": "k_pchPathUserHandLeft","consttype": "const char *", "constval": "/user/hand/left"} + "constname": "k_pchPathUserHandLeft","consttype": "const char *const", "constval": "/user/hand/left"} ,{ - "constname": "k_pchPathUserHandPrimary","consttype": "const char *", "constval": "/user/hand/primary"} + "constname": "k_pchPathUserHandPrimary","consttype": "const char *const", "constval": "/user/hand/primary"} ,{ - "constname": "k_pchPathUserHandSecondary","consttype": "const char *", "constval": "/user/hand/secondary"} + "constname": "k_pchPathUserHandSecondary","consttype": "const char *const", "constval": "/user/hand/secondary"} ,{ - "constname": "k_pchPathUserHead","consttype": "const char *", "constval": "/user/head"} + "constname": "k_pchPathUserHead","consttype": "const char *const", "constval": "/user/head"} ,{ - "constname": "k_pchPathUserGamepad","consttype": "const char *", "constval": "/user/gamepad"} + "constname": "k_pchPathUserGamepad","consttype": "const char *const", "constval": "/user/gamepad"} ,{ - "constname": "k_pchPathUserTreadmill","consttype": "const char *", "constval": "/user/treadmill"} + "constname": "k_pchPathUserTreadmill","consttype": "const char *const", "constval": "/user/treadmill"} ,{ - "constname": "k_pchPathUserStylus","consttype": "const char *", "constval": "/user/stylus"} + "constname": "k_pchPathUserStylus","consttype": "const char *const", "constval": "/user/stylus"} ,{ - "constname": "k_pchPathDevices","consttype": "const char *", "constval": "/devices"} + "constname": "k_pchPathDevices","consttype": "const char *const", "constval": "/devices"} ,{ - "constname": "k_pchPathDevicePath","consttype": "const char *", "constval": "/device_path"} + "constname": "k_pchPathDevicePath","consttype": "const char *const", "constval": "/device_path"} ,{ - "constname": "k_pchPathBestAliasPath","consttype": "const char *", "constval": "/best_alias_path"} + "constname": "k_pchPathBestAliasPath","consttype": "const char *const", "constval": "/best_alias_path"} ,{ - "constname": "k_pchPathBoundTrackerAliasPath","consttype": "const char *", "constval": "/bound_tracker_path"} + "constname": "k_pchPathBoundTrackerAliasPath","consttype": "const char *const", "constval": "/bound_tracker_path"} ,{ - "constname": "k_pchPathBoundTrackerRole","consttype": "const char *", "constval": "/bound_tracker_role"} + "constname": "k_pchPathBoundTrackerRole","consttype": "const char *const", "constval": "/bound_tracker_role"} ,{ - "constname": "k_pchPathPoseRaw","consttype": "const char *", "constval": "/pose/raw"} + "constname": "k_pchPathPoseRaw","consttype": "const char *const", "constval": "/pose/raw"} ,{ - "constname": "k_pchPathPoseTip","consttype": "const char *", "constval": "/pose/tip"} + "constname": "k_pchPathPoseTip","consttype": "const char *const", "constval": "/pose/tip"} ,{ - "constname": "k_pchPathPoseGrip","consttype": "const char *", "constval": "/pose/grip"} + "constname": "k_pchPathPoseGrip","consttype": "const char *const", "constval": "/pose/grip"} ,{ - "constname": "k_pchPathSystemButtonClick","consttype": "const char *", "constval": "/input/system/click"} + "constname": "k_pchPathSystemButtonClick","consttype": "const char *const", "constval": "/input/system/click"} ,{ - "constname": "k_pchPathProximity","consttype": "const char *", "constval": "/proximity"} + "constname": "k_pchPathProximity","consttype": "const char *const", "constval": "/proximity"} ,{ - "constname": "k_pchPathControllerTypePrefix","consttype": "const char *", "constval": "/controller_type/"} + "constname": "k_pchPathControllerTypePrefix","consttype": "const char *const", "constval": "/controller_type/"} ,{ - "constname": "k_pchPathInputProfileSuffix","consttype": "const char *", "constval": "/input_profile"} + "constname": "k_pchPathInputProfileSuffix","consttype": "const char *const", "constval": "/input_profile"} ,{ - "constname": "k_pchPathBindingNameSuffix","consttype": "const char *", "constval": "/binding_name"} + "constname": "k_pchPathBindingNameSuffix","consttype": "const char *const", "constval": "/binding_name"} ,{ - "constname": "k_pchPathBindingUrlSuffix","consttype": "const char *", "constval": "/binding_url"} + "constname": "k_pchPathBindingUrlSuffix","consttype": "const char *const", "constval": "/binding_url"} ,{ - "constname": "k_pchPathBindingErrorSuffix","consttype": "const char *", "constval": "/binding_error"} + "constname": "k_pchPathBindingErrorSuffix","consttype": "const char *const", "constval": "/binding_error"} ,{ - "constname": "k_pchPathActiveActionSets","consttype": "const char *", "constval": "/active_action_sets"} + "constname": "k_pchPathActiveActionSets","consttype": "const char *const", "constval": "/active_action_sets"} ,{ - "constname": "k_pchPathComponentUpdates","consttype": "const char *", "constval": "/total_component_updates"} + "constname": "k_pchPathComponentUpdates","consttype": "const char *const", "constval": "/total_component_updates"} ,{ - "constname": "k_pchPathUserFootLeft","consttype": "const char *", "constval": "/user/foot/left"} + "constname": "k_pchPathUserFootLeft","consttype": "const char *const", "constval": "/user/foot/left"} ,{ - "constname": "k_pchPathUserFootRight","consttype": "const char *", "constval": "/user/foot/right"} + "constname": "k_pchPathUserFootRight","consttype": "const char *const", "constval": "/user/foot/right"} ,{ - "constname": "k_pchPathUserShoulderLeft","consttype": "const char *", "constval": "/user/shoulder/left"} + "constname": "k_pchPathUserShoulderLeft","consttype": "const char *const", "constval": "/user/shoulder/left"} ,{ - "constname": "k_pchPathUserShoulderRight","consttype": "const char *", "constval": "/user/shoulder/right"} + "constname": "k_pchPathUserShoulderRight","consttype": "const char *const", "constval": "/user/shoulder/right"} ,{ - "constname": "k_pchPathUserElbowLeft","consttype": "const char *", "constval": "/user/elbow/left"} + "constname": "k_pchPathUserElbowLeft","consttype": "const char *const", "constval": "/user/elbow/left"} ,{ - "constname": "k_pchPathUserElbowRight","consttype": "const char *", "constval": "/user/elbow/right"} + "constname": "k_pchPathUserElbowRight","consttype": "const char *const", "constval": "/user/elbow/right"} ,{ - "constname": "k_pchPathUserKneeLeft","consttype": "const char *", "constval": "/user/knee/left"} + "constname": "k_pchPathUserKneeLeft","consttype": "const char *const", "constval": "/user/knee/left"} ,{ - "constname": "k_pchPathUserKneeRight","consttype": "const char *", "constval": "/user/knee/right"} + "constname": "k_pchPathUserKneeRight","consttype": "const char *const", "constval": "/user/knee/right"} ,{ - "constname": "k_pchPathUserWristLeft","consttype": "const char *", "constval": "/user/wrist/left"} + "constname": "k_pchPathUserWristLeft","consttype": "const char *const", "constval": "/user/wrist/left"} ,{ - "constname": "k_pchPathUserWristRight","consttype": "const char *", "constval": "/user/wrist/right"} + "constname": "k_pchPathUserWristRight","consttype": "const char *const", "constval": "/user/wrist/right"} ,{ - "constname": "k_pchPathUserAnkleLeft","consttype": "const char *", "constval": "/user/ankle/left"} + "constname": "k_pchPathUserAnkleLeft","consttype": "const char *const", "constval": "/user/ankle/left"} ,{ - "constname": "k_pchPathUserAnkleRight","consttype": "const char *", "constval": "/user/ankle/right"} + "constname": "k_pchPathUserAnkleRight","consttype": "const char *const", "constval": "/user/ankle/right"} ,{ - "constname": "k_pchPathUserWaist","consttype": "const char *", "constval": "/user/waist"} + "constname": "k_pchPathUserWaist","consttype": "const char *const", "constval": "/user/waist"} ,{ - "constname": "k_pchPathUserChest","consttype": "const char *", "constval": "/user/chest"} + "constname": "k_pchPathUserChest","consttype": "const char *const", "constval": "/user/chest"} ,{ - "constname": "k_pchPathUserCamera","consttype": "const char *", "constval": "/user/camera"} + "constname": "k_pchPathUserCamera","consttype": "const char *const", "constval": "/user/camera"} ,{ - "constname": "k_pchPathUserKeyboard","consttype": "const char *", "constval": "/user/keyboard"} + "constname": "k_pchPathUserKeyboard","consttype": "const char *const", "constval": "/user/keyboard"} ,{ - "constname": "k_pchPathClientAppKey","consttype": "const char *", "constval": "/client_info/app_key"} + "constname": "k_pchPathClientAppKey","consttype": "const char *const", "constval": "/client_info/app_key"} ,{ "constname": "k_ulInvalidPathHandle","consttype": "const PathHandle_t", "constval": "0"} ,{ - "constname": "IVRPaths_Version","consttype": "const char *const", "constval": "IVRPaths_001"} + "constname": "IVRPaths_Version","consttype": "const char *const", "constval": "IVRPaths_002"} ,{ "constname": "IVRBlockQueue_Version","consttype": "const char *", "constval": "IVRBlockQueue_005"} ], @@ -2048,6 +2220,12 @@ ,{"struct": "vr::VRBoneTransform_t","fields": [ { "fieldname": "position", "fieldtype": "struct vr::HmdVector4_t"}, { "fieldname": "orientation", "fieldtype": "struct vr::HmdQuaternionf_t"}]} +,{"struct": "vr::VREyeTrackingData_t","fields": [ +{ "fieldname": "bActive", "fieldtype": "_Bool"}, +{ "fieldname": "bValid", "fieldtype": "_Bool"}, +{ "fieldname": "bTracked", "fieldtype": "_Bool"}, +{ "fieldname": "vGazeOrigin", "fieldtype": "vr::HmdVector3_t"}, +{ "fieldname": "vGazeTarget", "fieldtype": "vr::HmdVector3_t"}]} ,{"struct": "vr::DistortionCoordinates_t","fields": [ { "fieldname": "rfRed", "fieldtype": "float [2]"}, { "fieldname": "rfGreen", "fieldtype": "float [2]"}, @@ -2071,6 +2249,27 @@ { "fieldname": "depth", "fieldtype": "struct vr::VRTextureDepthInfo_t"}]} ,{"struct": "vr::VRTextureWithPoseAndDepth_t","fields": [ { "fieldname": "depth", "fieldtype": "struct vr::VRTextureDepthInfo_t"}]} +,{"struct": "vr::VRTextureMotionInfo_t","fields": [ +{ "fieldname": "handle", "fieldtype": "void *"}, +{ "fieldname": "mDeltaPose", "fieldtype": "struct vr::HmdMatrix44_t"}]} +,{"struct": "vr::VRTextureWithMotion_t","fields": [ +{ "fieldname": "motion", "fieldtype": "struct vr::VRTextureMotionInfo_t"}]} +,{"struct": "vr::DmabufPlane_t","fields": [ +{ "fieldname": "unOffset", "fieldtype": "uint32_t"}, +{ "fieldname": "unStride", "fieldtype": "uint32_t"}, +{ "fieldname": "nFd", "fieldtype": "int32_t"}]} +,{"struct": "vr::DmabufAttributes_t","fields": [ +{ "fieldname": "pNext", "fieldtype": "void *"}, +{ "fieldname": "unWidth", "fieldtype": "uint32_t"}, +{ "fieldname": "unHeight", "fieldtype": "uint32_t"}, +{ "fieldname": "unDepth", "fieldtype": "uint32_t"}, +{ "fieldname": "unMipLevels", "fieldtype": "uint32_t"}, +{ "fieldname": "unArrayLayers", "fieldtype": "uint32_t"}, +{ "fieldname": "unSampleCount", "fieldtype": "uint32_t"}, +{ "fieldname": "unFormat", "fieldtype": "uint32_t"}, +{ "fieldname": "ulModifier", "fieldtype": "uint64_t"}, +{ "fieldname": "unPlaneCount", "fieldtype": "uint32_t"}, +{ "fieldname": "plane", "fieldtype": "struct vr::DmabufPlane_t [4]"}]} ,{"struct": "vr::TrackedDevicePose_t","fields": [ { "fieldname": "mDeviceToAbsoluteTracking", "fieldtype": "struct vr::HmdMatrix34_t"}, { "fieldname": "vVelocity", "fieldtype": "struct vr::HmdVector3_t"}, @@ -2101,12 +2300,14 @@ ,{"struct": "vr::VREvent_Mouse_t","fields": [ { "fieldname": "x", "fieldtype": "float"}, { "fieldname": "y", "fieldtype": "float"}, -{ "fieldname": "button", "fieldtype": "uint32_t"}]} +{ "fieldname": "button", "fieldtype": "uint32_t"}, +{ "fieldname": "cursorIndex", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_Scroll_t","fields": [ { "fieldname": "xdelta", "fieldtype": "float"}, { "fieldname": "ydelta", "fieldtype": "float"}, { "fieldname": "unused", "fieldtype": "uint32_t"}, -{ "fieldname": "viewportscale", "fieldtype": "float"}]} +{ "fieldname": "viewportscale", "fieldtype": "float"}, +{ "fieldname": "cursorIndex", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_TouchPadMove_t","fields": [ { "fieldname": "bFingerDown", "fieldtype": "_Bool"}, { "fieldname": "flSecondsFingerDown", "fieldtype": "float"}, @@ -2125,16 +2326,18 @@ ,{"struct": "vr::VREvent_Overlay_t","fields": [ { "fieldname": "overlayHandle", "fieldtype": "uint64_t"}, { "fieldname": "devicePath", "fieldtype": "uint64_t"}, -{ "fieldname": "memoryBlockId", "fieldtype": "uint64_t"}]} +{ "fieldname": "memoryBlockId", "fieldtype": "uint64_t"}, +{ "fieldname": "cursorIndex", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_Status_t","fields": [ { "fieldname": "statusState", "fieldtype": "uint32_t"}]} ,{"struct": "vr::VREvent_Keyboard_t","fields": [ { "fieldname": "cNewInput", "fieldtype": "char [8]"}, -{ "fieldname": "uUserValue", "fieldtype": "uint64_t"}]} +{ "fieldname": "uUserValue", "fieldtype": "uint64_t"}, +{ "fieldname": "overlayHandle", "fieldtype": "uint64_t"}]} ,{"struct": "vr::VREvent_Ipd_t","fields": [ { "fieldname": "ipdMeters", "fieldtype": "float"}]} ,{"struct": "vr::VREvent_Chaperone_t","fields": [ -{ "fieldname": "m_nPreviousUniverse", "fieldtype": "uint64_t"}, +{ "fieldname": "m_nPreviousUniverse_deprecated", "fieldtype": "uint64_t"}, { "fieldname": "m_nCurrentUniverse", "fieldtype": "uint64_t"}]} ,{"struct": "vr::VREvent_Reserved_t","fields": [ { "fieldname": "reserved0", "fieldtype": "uint64_t"}, @@ -2196,6 +2399,10 @@ { "fieldname": "nBrowserIdentifier", "fieldtype": "int32_t"}]} ,{"struct": "vr::VREvent_HDCPError_t","fields": [ { "fieldname": "eCode", "fieldtype": "enum vr::EHDCPError"}]} +,{"struct": "vr::VREvent_AudioVolumeControl_t","fields": [ +{ "fieldname": "fVolumeLevel", "fieldtype": "float"}]} +,{"struct": "vr::VREvent_AudioMuteControl_t","fields": [ +{ "fieldname": "bMute", "fieldtype": "_Bool"}]} ,{"struct": "vr::(anonymous)","fields": [ { "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"}, { "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"}, @@ -2225,7 +2432,9 @@ { "fieldname": "progressUpdate", "fieldtype": "struct vr::VREvent_ProgressUpdate_t"}, { "fieldname": "showUi", "fieldtype": "struct vr::VREvent_ShowUI_t"}, { "fieldname": "showDevTools", "fieldtype": "struct vr::VREvent_ShowDevTools_t"}, -{ "fieldname": "hdcpError", "fieldtype": "struct vr::VREvent_HDCPError_t"}]} +{ "fieldname": "hdcpError", "fieldtype": "struct vr::VREvent_HDCPError_t"}, +{ "fieldname": "audioVolumeControl", "fieldtype": "struct vr::VREvent_AudioVolumeControl_t"}, +{ "fieldname": "audioMuteControl", "fieldtype": "struct vr::VREvent_AudioMuteControl_t"}]} ,{"struct": "vr::VREvent_t","fields": [ { "fieldname": "eventType", "fieldtype": "uint32_t"}, { "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, @@ -2280,7 +2489,8 @@ { "fieldname": "m_flCompositorRenderStartMs", "fieldtype": "float"}, { "fieldname": "m_HmdPose", "fieldtype": "vr::TrackedDevicePose_t"}, { "fieldname": "m_nNumVSyncsReadyForUse", "fieldtype": "uint32_t"}, -{ "fieldname": "m_nNumVSyncsToFirstView", "fieldtype": "uint32_t"}]} +{ "fieldname": "m_nNumVSyncsToFirstView", "fieldtype": "uint32_t"}, +{ "fieldname": "m_flTransferLatencyMs", "fieldtype": "float"}]} ,{"struct": "vr::Compositor_BenchmarkResults","fields": [ { "fieldname": "m_flMegaPixelsPerSecond", "fieldtype": "float"}, { "fieldname": "m_flHmdRecommendedMegaPixelsPerSecond", "fieldtype": "float"}]} @@ -2295,6 +2505,9 @@ { "fieldname": "vAccel", "fieldtype": "struct vr::HmdVector3d_t"}, { "fieldname": "vGyro", "fieldtype": "struct vr::HmdVector3d_t"}, { "fieldname": "unOffScaleFlags", "fieldtype": "uint32_t"}]} +,{"struct": "vr::DistortionCoordinate_t","fields": [ +{ "fieldname": "u", "fieldtype": "float"}, +{ "fieldname": "v", "fieldtype": "float"}]} ,{"struct": "vr::AppOverrideKeys_t","fields": [ { "fieldname": "pchKey", "fieldtype": "const char *"}, { "fieldname": "pchValue", "fieldtype": "const char *"}]} @@ -2461,7 +2674,8 @@ { "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 *"}]} +{ "fieldname": "m_pVRNotifications", "fieldtype": "class vr::IVRNotifications *"}, +{ "fieldname": "m_pVRIPCResourceManagerClient", "fieldtype": "class vr::IVRIPCResourceManagerClient *"}]} ,{"struct": "vr::PropertyWrite_t","fields": [ { "fieldname": "prop", "fieldtype": "enum vr::ETrackedDeviceProperty"}, { "fieldname": "writeType", "fieldtype": "enum vr::EPropertyWriteType"}, @@ -2479,6 +2693,8 @@ { "fieldname": "eError", "fieldtype": "enum vr::ETrackedPropertyError"}]} ,{"struct": "vr::CVRPropertyHelpers","fields": [ { "fieldname": "m_pProperties", "fieldtype": "class vr::IVRProperties *"}]} +,{"struct": "vr::PathWriteOptions_t","fields": [ +{ "fieldname": "bPostEvents", "fieldtype": "_Bool"}]} ,{"struct": "vr::PathWrite_t","fields": [ { "fieldname": "ulPath", "fieldtype": "PathHandle_t"}, { "fieldname": "writeType", "fieldtype": "enum vr::EPropertyWriteType"}, @@ -2487,7 +2703,9 @@ { "fieldname": "unBufferSize", "fieldtype": "uint32_t"}, { "fieldname": "unTag", "fieldtype": "PropertyTypeTag_t"}, { "fieldname": "eError", "fieldtype": "enum vr::ETrackedPropertyError"}, -{ "fieldname": "pszPath", "fieldtype": "const char *"}]} +{ "fieldname": "pszPath", "fieldtype": "const char *"}, +{ "fieldname": "bPostEvents", "fieldtype": "_Bool"}, +{ "fieldname": "bValueChanged", "fieldtype": "_Bool"}]} ,{"struct": "vr::PathRead_t","fields": [ { "fieldname": "ulPath", "fieldtype": "PathHandle_t"}, { "fieldname": "pvBuffer", "fieldtype": "void *"}, @@ -2539,6 +2757,19 @@ { "paramname": "pDistortionCoordinates" ,"paramtype": "struct vr::DistortionCoordinates_t *"} ] } +,{ + "classname": "vr::IVRSystem", + "methodname": "ComputeDistortionSet", + "returntype": "bool", + "params": [ +{ "paramname": "eEye" ,"paramtype": "vr::EVREye"}, +{ "paramname": "eChannel" ,"paramtype": "vr::EVRDistortionChannel"}, +{ "paramname": "bAsNormalizedDeviceCoordinates" ,"paramtype": "bool"}, +{ "paramname": "nNumCoordinates" ,"paramtype": "uint32_t"}, +{ "paramname": "pInput" ,"paramtype": "const struct vr::DistortionCoordinate_t *"}, +{ "paramname": "pOutput" ,"paramtype": "struct vr::DistortionCoordinate_t *"} + ] +} ,{ "classname": "vr::IVRSystem", "methodname": "GetEyeToHeadTransform", @@ -2777,6 +3008,18 @@ { "paramname": "pTrackedDevicePose" ,"paramtype": "vr::TrackedDevicePose_t *"} ] } +,{ + "classname": "vr::IVRSystem", + "methodname": "PollNextEventWithPoseAndOverlays", + "returntype": "bool", + "params": [ +{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, +{ "paramname": "pEvent" ,"paramtype": "struct vr::VREvent_t *"}, +{ "paramname": "uncbVREvent" ,"paramtype": "uint32_t"}, +{ "paramname": "pTrackedDevicePose" ,"paramtype": "struct vr::TrackedDevicePose_t *"}, +{ "paramname": "pulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t *"} + ] +} ,{ "classname": "vr::IVRSystem", "methodname": "GetEventTypeNameFromEnum", @@ -2794,6 +3037,24 @@ { "paramname": "type" ,"paramtype": "vr::EHiddenAreaMeshType"} ] } +,{ + "classname": "vr::IVRSystem", + "methodname": "GetEyeTrackedFoveationCenter", + "returntype": "bool", + "params": [ +{ "paramname": "pNdcLeft" ,"paramtype": "struct vr::HmdVector2_t *"}, +{ "paramname": "pNdcRight" ,"paramtype": "struct vr::HmdVector2_t *"} + ] +} +,{ + "classname": "vr::IVRSystem", + "methodname": "GetEyeTrackedFoveationCenterForProjection", + "returntype": "bool", + "params": [ +{ "paramname": "pProjMat" ,"paramtype": "const struct vr::HmdMatrix44_t *"}, +{ "paramname": "pNdc" ,"paramtype": "struct vr::HmdVector2_t *"} + ] +} ,{ "classname": "vr::IVRSystem", "methodname": "GetControllerState", @@ -2889,6 +3150,16 @@ "methodname": "GetRuntimeVersion", "returntype": "const char *" } +,{ + "classname": "vr::IVRSystem", + "methodname": "SetSDKVersion", + "returntype": "vr::EVRInitError", + "params": [ +{ "paramname": "nVersionMajor" ,"paramtype": "uint32_t"}, +{ "paramname": "nVersionMinor" ,"paramtype": "uint32_t"}, +{ "paramname": "nVersionBuild" ,"paramtype": "uint32_t"} + ] +} ,{ "classname": "vr::IVRExtendedDisplay", "methodname": "GetWindowBounds", @@ -3321,6 +3592,14 @@ { "paramname": "pchWorkingDirectory" ,"paramtype": "const char *"} ] } +,{ + "classname": "vr::IVRApplications", + "methodname": "RegisterSubprocess", + "returntype": "vr::EVRApplicationError", + "params": [ +{ "paramname": "nPid" ,"paramtype": "uint32_t"} + ] +} ,{ "classname": "vr::IVRApplications", "methodname": "GetCurrentSceneProcessId", @@ -3480,7 +3759,7 @@ "methodname": "SetWorkingPerimeter", "returntype": "void", "params": [ -{ "paramname": "pPointBuffer" ,"array_count": "unPointCount" ,"paramtype": "struct vr::HmdVector2_t *"}, +{ "paramname": "pPointBuffer" ,"array_count": "unPointCount" ,"paramtype": "const struct vr::HmdVector2_t *"}, { "paramname": "unPointCount" ,"paramtype": "uint32_t"} ] } @@ -3594,6 +3873,19 @@ { "paramname": "pOutputGamePose" ,"paramtype": "struct vr::TrackedDevicePose_t *"} ] } +,{ + "classname": "vr::IVRCompositor", + "methodname": "GetSubmitTexture", + "returntype": "vr::EVRCompositorError", + "params": [ +{ "paramname": "pOutTexture" ,"paramtype": "struct vr::Texture_t *"}, +{ "paramname": "pNeedsFlush" ,"paramtype": "bool *"}, +{ "paramname": "eUsage" ,"paramtype": "vr::EVRCompositorTextureUsage"}, +{ "paramname": "pTexture" ,"paramtype": "const struct vr::Texture_t *"}, +{ "paramname": "pBounds" ,"paramtype": "const struct vr::VRTextureBounds_t *"}, +{ "paramname": "nSubmitFlags" ,"paramtype": "vr::EVRSubmitFlags"} + ] +} ,{ "classname": "vr::IVRCompositor", "methodname": "Submit", @@ -3605,6 +3897,18 @@ { "paramname": "nSubmitFlags" ,"paramtype": "vr::EVRSubmitFlags"} ] } +,{ + "classname": "vr::IVRCompositor", + "methodname": "SubmitWithArrayIndex", + "returntype": "vr::EVRCompositorError", + "params": [ +{ "paramname": "eEye" ,"paramtype": "vr::EVREye"}, +{ "paramname": "pTexture" ,"paramtype": "const struct vr::Texture_t *"}, +{ "paramname": "unTextureArrayIndex" ,"paramtype": "uint32_t"}, +{ "paramname": "pBounds" ,"paramtype": "const struct vr::VRTextureBounds_t *"}, +{ "paramname": "nSubmitFlags" ,"paramtype": "vr::EVRSubmitFlags"} + ] +} ,{ "classname": "vr::IVRCompositor", "methodname": "ClearLastSubmittedFrame", @@ -3940,6 +4244,17 @@ { "paramname": "pOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t *"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "CreateSubviewOverlay", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "parentOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "pchSubviewOverlayKey" ,"paramtype": "const char *"}, +{ "paramname": "pchSubviewOverlayName" ,"paramtype": "const char *"}, +{ "paramname": "pSubviewOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t *"} + ] +} ,{ "classname": "vr::IVROverlay", "methodname": "DestroyOverlay", @@ -4311,6 +4626,16 @@ { "paramname": "eEye" ,"paramtype": "vr::EVREye"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "SetSubviewPosition", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "fX" ,"paramtype": "float"}, +{ "paramname": "fY" ,"paramtype": "float"} + ] +} ,{ "classname": "vr::IVROverlay", "methodname": "ShowOverlay", @@ -5330,6 +5655,29 @@ { "paramname": "eDominantHand" ,"paramtype": "vr::ETrackedControllerRole"} ] } +,{ + "classname": "vr::IVRInput", + "methodname": "GetEyeTrackingDataRelativeToNow", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, +{ "paramname": "fPredictedSecondsFromNow" ,"paramtype": "float"}, +{ "paramname": "pEyeTrackingData" ,"paramtype": "vr::VREyeTrackingData_t *"}, +{ "paramname": "ulEyeTrackingDataSize" ,"paramtype": "uint32_t"} + ] +} +,{ + "classname": "vr::IVRInput", + "methodname": "GetEyeTrackingDataForNextFrame", + "returntype": "vr::EVRInputError", + "params": [ +{ "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, +{ "paramname": "eOrigin" ,"paramtype": "vr::ETrackingUniverseOrigin"}, +{ "paramname": "pEyeTrackingData" ,"paramtype": "vr::VREyeTrackingData_t *"}, +{ "paramname": "ulEyeTrackingDataSize" ,"paramtype": "uint32_t"} + ] +} ,{ "classname": "vr::IVRInput", "methodname": "GetBoneCount", @@ -5478,7 +5826,7 @@ "returntype": "vr::EVRInputError", "params": [ { "paramname": "action" ,"paramtype": "vr::VRActionHandle_t"}, -{ "paramname": "pOriginInfo" ,"paramtype": "struct vr::InputBindingInfo_t *"}, +{ "paramname": "pOriginInfo" ,"array_count": "unBindingInfoCount" ,"paramtype": "struct vr::InputBindingInfo_t *"}, { "paramname": "unBindingInfoSize" ,"paramtype": "uint32_t"}, { "paramname": "unBindingInfoCount" ,"paramtype": "uint32_t"}, { "paramname": "punReturnedBindingInfoCount" ,"paramtype": "uint32_t *"} @@ -5676,6 +6024,104 @@ { "paramname": "unResponseBufferSize" ,"paramtype": "uint32_t"} ] } +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "NewSharedVulkanImage", + "returntype": "bool", + "params": [ +{ "paramname": "nImageFormat" ,"paramtype": "uint32_t"}, +{ "paramname": "nWidth" ,"paramtype": "uint32_t"}, +{ "paramname": "nHeight" ,"paramtype": "uint32_t"}, +{ "paramname": "bRenderable" ,"paramtype": "bool"}, +{ "paramname": "bMappable" ,"paramtype": "bool"}, +{ "paramname": "bComputeAccess" ,"paramtype": "bool"}, +{ "paramname": "unMipLevels" ,"paramtype": "uint32_t"}, +{ "paramname": "unArrayLayerCount" ,"paramtype": "uint32_t"}, +{ "paramname": "unAdditionalVkCreateFlags" ,"paramtype": "uint32_t"}, +{ "paramname": "unAdditionalVkUsageFlags" ,"paramtype": "uint32_t"}, +{ "paramname": "pSharedHandle" ,"paramtype": "vr::SharedTextureHandle_t *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "NewSharedVulkanBuffer", + "returntype": "bool", + "params": [ +{ "paramname": "nSize" ,"paramtype": "uint32_t"}, +{ "paramname": "nUsageFlags" ,"paramtype": "uint32_t"}, +{ "paramname": "pSharedHandle" ,"paramtype": "vr::SharedTextureHandle_t *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "NewSharedVulkanSemaphore", + "returntype": "bool", + "params": [ +{ "paramname": "bCounting" ,"paramtype": "bool"}, +{ "paramname": "pSharedHandle" ,"paramtype": "vr::SharedTextureHandle_t *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "RefResource", + "returntype": "bool", + "params": [ +{ "paramname": "hSharedHandle" ,"paramtype": "vr::SharedTextureHandle_t"}, +{ "paramname": "pNewIpcHandle" ,"paramtype": "uint64_t *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "UnrefResource", + "returntype": "bool", + "params": [ +{ "paramname": "hSharedHandle" ,"paramtype": "vr::SharedTextureHandle_t"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "GetDmabufFormats", + "returntype": "bool", + "params": [ +{ "paramname": "pOutFormatCount" ,"paramtype": "uint32_t *"}, +{ "paramname": "pOutFormats" ,"paramtype": "uint32_t *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "GetDmabufModifiers", + "returntype": "bool", + "params": [ +{ "paramname": "eApplicationType" ,"paramtype": "vr::EVRApplicationType"}, +{ "paramname": "unDRMFormat" ,"paramtype": "uint32_t"}, +{ "paramname": "pOutModifierCount" ,"paramtype": "uint32_t *"}, +{ "paramname": "pOutModifiers" ,"paramtype": "uint64_t *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "ImportDmabuf", + "returntype": "bool", + "params": [ +{ "paramname": "eApplicationType" ,"paramtype": "vr::EVRApplicationType"}, +{ "paramname": "pDmabufAttributes" ,"paramtype": "vr::DmabufAttributes_t *"}, +{ "paramname": "pSharedHandle" ,"paramtype": "vr::SharedTextureHandle_t *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "ReceiveSharedFd", + "returntype": "bool", + "params": [ +{ "paramname": "ulIpcHandle" ,"paramtype": "uint64_t"}, +{ "paramname": "pOutFd" ,"paramtype": "int *"} + ] +} +,{ + "classname": "vr::IVRIPCResourceManagerClient", + "methodname": "DestructIVRIPCResourceManagerClient", + "returntype": "void" +} ,{ "classname": "vr::IVRProperties", "methodname": "ReadPropertyBatch", diff --git a/third-party/openvr/headers/openvr_capi.h b/third-party/openvr/headers/openvr_capi.h index 1defee32..b4dd9926 100644 --- a/third-party/openvr/headers/openvr_capi.h +++ b/third-party/openvr/headers/openvr_capi.h @@ -74,6 +74,7 @@ typedef double vrshared_double; // OpenVR Constants +static const unsigned long MaxDmabufPlaneCount = 4; static const unsigned long k_nDriverNone = 4294967295; static const unsigned long k_unMaxDriverDebugResponseSize = 32768; static const unsigned long k_unTrackedDeviceIndex_Hmd = 0; @@ -112,25 +113,26 @@ static const unsigned long k_unMaxPropertyStringSize = 32768; static const unsigned long long k_ulInvalidActionHandle = 0; static const unsigned long long k_ulInvalidActionSetHandle = 0; static const unsigned long long k_ulInvalidInputValueHandle = 0; +static const unsigned long long k_ulInvalidInputComponentHandle = 0; static const unsigned long k_unControllerStateAxisCount = 5; static const unsigned long long k_ulOverlayHandleInvalid = 0; static const unsigned long k_unMaxDistortionFunctionParameters = 8; static const unsigned long k_unScreenshotHandleInvalid = 0; -static const char * IVRSystem_Version = "IVRSystem_022"; +static const char * IVRSystem_Version = "IVRSystem_026"; static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_006"; static const unsigned long k_unMaxApplicationKeyLength = 128; static const char * k_pch_MimeType_HomeApp = "vr/home"; static const char * k_pch_MimeType_GameTheater = "vr/game_theater"; -static const char * IVRApplications_Version = "IVRApplications_007"; +static const char * IVRApplications_Version = "IVRApplications_008"; static const char * IVRChaperone_Version = "IVRChaperone_004"; static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; -static const char * IVRCompositor_Version = "IVRCompositor_027"; +static const char * IVRCompositor_Version = "IVRCompositor_029"; static const unsigned long k_unVROverlayMaxKeyLength = 128; static const unsigned long k_unVROverlayMaxNameLength = 128; static const unsigned long k_unMaxOverlayCount = 128; static const unsigned long k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; -static const char * IVROverlay_Version = "IVROverlay_027"; +static const char * IVROverlay_Version = "IVROverlay_028"; static const char * IVROverlayView_Version = "IVROverlayView_003"; static const unsigned long k_unHeadsetViewMaxWidth = 3840; static const unsigned long k_unHeadsetViewMaxHeight = 2160; @@ -139,7 +141,10 @@ static const char * IVRHeadsetView_Version = "IVRHeadsetView_001"; static const char * k_pch_Controller_Component_GDC2015 = "gdc2015"; static const char * k_pch_Controller_Component_Base = "base"; static const char * k_pch_Controller_Component_Tip = "tip"; +static const char * k_pch_Controller_Component_OpenXR_Aim = "openxr_aim"; static const char * k_pch_Controller_Component_HandGrip = "handgrip"; +static const char * k_pch_Controller_Component_OpenXR_Grip = "openxr_grip"; +static const char * k_pch_Controller_Component_OpenXR_HandModel = "openxr_handmodel"; static const char * k_pch_Controller_Component_Status = "status"; static const char * IVRRenderModels_Version = "IVRRenderModels_006"; static const unsigned long k_unNotificationTextMaxSize = 256; @@ -147,6 +152,7 @@ static const char * IVRNotifications_Version = "IVRNotifications_002"; static const unsigned long k_unMaxSettingsKeyLength = 128; static const char * IVRSettings_Version = "IVRSettings_003"; static const char * k_pch_SteamVR_Section = "steamvr"; +static const char * k_pch_SteamVR_Contrast_Float = "contrast"; static const char * k_pch_SteamVR_RequireHmd_String = "requireHmd"; static const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; static const char * k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; @@ -164,6 +170,7 @@ static const char * k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRa static const char * k_pch_SteamVR_GridColor_String = "gridColor"; static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; static const char * k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; +static const char * k_pch_SteamVR_StartColor_String = "startColor"; static const char * k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences"; static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; @@ -176,10 +183,17 @@ static const char * k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; static const char * k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; static const char * k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; static const char * k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; +static const char * k_pch_SteamVR_FoveatedSharpening_Bool = "sharpening"; +static const char * k_pch_SteamVR_FoveatedSharpeningOverride_Int32 = "sharpeningOverride"; static const char * k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle"; static const char * k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict"; static const char * k_pch_SteamVR_WorldScale_Float = "worldScale"; static const char * k_pch_SteamVR_FovScale_Int32 = "fovScale"; +static const char * k_pch_SteamVR_FovScaleInner_Int32 = "fovScaleInner"; +static const char * k_pch_SteamVR_FovScaleUpper_Int32 = "fovScaleUpper"; +static const char * k_pch_SteamVR_FovScaleLower_Int32 = "fovScaleLower"; +static const char * k_pch_SteamVR_FovScaleFormat_Int32 = "fovScaleFormat"; +static const char * k_pch_SteamVR_FovScaleLetterboxed_Bool = "fovScaleLetterboxed"; static const char * k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; @@ -203,7 +217,6 @@ static const char * k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleM static const char * k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; static const char * k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; static const char * k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; -static const char * k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; static const char * k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; static const char * k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; static const char * k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; @@ -224,6 +237,10 @@ static const char * k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculu static const char * k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility"; static const char * k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode"; static const char * k_pch_SteamVR_UsePrism_Bool = "usePrism"; +static const char * k_pch_SteamVR_AllowFallbackMirrorWindowLinux_Bool = "allowFallbackMirrorWindowLinux"; +static const char * k_pch_SteamVR_DisableKeyboardPrivacy_Bool = "disableKeyboardPrivacy"; +static const char * k_pch_OpenXR_Section = "openxr"; +static const char * k_pch_OpenXR_MetaUnityPluginCompatibility_Int32 = "metaUnityPluginCompatibility"; 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"; @@ -259,6 +276,8 @@ static const char * k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; static const char * k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; static const char * k_pch_UserInterface_Screenshots_Bool = "screenshots"; static const char * k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; +static const char * k_pch_UserInterface_CheckStatusInterval_Int = "vrmStatusCheckInterval"; +static const char * k_pch_UserInterface_CheckForSteam_Bool = "vrmCheckForSteam"; static const char * k_pch_Notifications_Section = "notifications"; static const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; static const char * k_pch_Keyboard_Section = "keyboard"; @@ -325,19 +344,24 @@ static const char * k_pch_Power_TurnOffControllersTimeout_Float = "turnOffContro static const char * k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; static const char * k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; +static const char * k_pch_Power_OverrideWindowsPowerScheme_Bool = "overrideWindowsPowerScheme"; static const char * k_pch_Dashboard_Section = "dashboard"; static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; static const char * k_pch_Dashboard_Position = "position"; -static const char * k_pch_Dashboard_DesktopScale = "desktopScale"; static const char * k_pch_Dashboard_DashboardScale = "dashboardScale"; static const char * k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer"; -static const char * k_pch_Dashboard_StickyDashboard = "stickyDashboard"; static const char * k_pch_Dashboard_AllowSteamOverlays_Bool = "allowSteamOverlays"; +static const char * k_pch_Dashboard_AllowVRGamepadUI_Bool = "allowVRGamepadUI"; +static const char * k_pch_Dashboard_SteamMatchesHMDFramerate = "steamMatchesHMDFramerate"; +static const char * k_pch_Dashboard_GrabHandleAcceleration = "grabHandleAcceleration"; +static const char * k_pch_Dashboard_OverlayBacksideColor_String = "overlayBacksideColor"; static const char * k_pch_modelskin_Section = "modelskins"; static const char * k_pch_Driver_Enable_Bool = "enable"; static const char * k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; static const char * k_pch_Driver_LoadPriority_Int32 = "loadPriority"; +static const char * k_pch_Driver_Hmd_AllowsClientToControlTextureIndex_Bool = "hmdAllowsClientToControlTextureIndex"; +static const char * k_pch_Driver_ForceSystemLayerUseAppPoses_Bool = "forceSystemLayerUseAppPoses"; static const char * k_pch_WebInterface_Section = "WebInterface"; static const char * k_pch_VRWebHelper_Section = "VRWebHelper"; static const char * k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; @@ -357,12 +381,16 @@ static const char * k_pch_DesktopUI_Section = "DesktopUI"; 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_LastKnown_ActualHMDDriver_String = "ActualHMDDriver"; +static const char * k_pch_LastKnown_HMDSerialNumber_String = "HMDSerialNumber"; +static const char * k_pch_LastKnown_HMDRemoteClientID_String = "RemoteClientID"; 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 * k_pch_GpuSpeed_Section = "GpuSpeed"; +static const char * k_pch_XRRenderModelCache_Section = "XRRenderModelUuidCache"; static const char * IVRScreenshots_Version = "IVRScreenshots_001"; static const char * IVRResources_Version = "IVRResources_001"; static const char * IVRDriverManager_Version = "IVRDriverManager_001"; @@ -373,12 +401,16 @@ static const unsigned long k_unMaxBoneNameLength = 32; static const int k_nActionSetOverlayGlobalPriorityMin = 16777216; static const int k_nActionSetOverlayGlobalPriorityMax = 33554431; static const int k_nActionSetPriorityReservedMin = 33554432; -static const char * IVRInput_Version = "IVRInput_010"; +static const char * IVRInput_Version = "IVRInput_011"; static const unsigned long long k_ulInvalidIOBufferHandle = 0; static const char * IVRIOBuffer_Version = "IVRIOBuffer_002"; static const unsigned long k_ulInvalidSpatialAnchorHandle = 0; static const char * IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; static const char * IVRDebug_Version = "IVRDebug_001"; +static const char * IVRIPCResourceManagerClient_Version = "IVRIPCResourceManagerClient_003"; +static const unsigned long k_nSteamVRVersionMajor = 2; +static const unsigned long k_nSteamVRVersionMinor = 15; +static const unsigned long k_nSteamVRVersionBuild = 6; static const unsigned long long k_ulDisplayRedirectContainer = 25769803779; static const char * IVRProperties_Version = "IVRProperties_001"; static const char * k_pchPathUserHandRight = "/user/hand/right"; @@ -424,7 +456,7 @@ static const char * k_pchPathUserCamera = "/user/camera"; static const char * k_pchPathUserKeyboard = "/user/keyboard"; static const char * k_pchPathClientAppKey = "/client_info/app_key"; static const unsigned long long k_ulInvalidPathHandle = 0; -static const char * IVRPaths_Version = "IVRPaths_001"; +static const char * IVRPaths_Version = "IVRPaths_002"; static const char * IVRBlockQueue_Version = "IVRBlockQueue_005"; // OpenVR Enums @@ -445,6 +477,8 @@ typedef enum ETextureType ETextureType_TextureType_DirectX12 = 4, ETextureType_TextureType_DXGISharedHandle = 5, ETextureType_TextureType_Metal = 6, + ETextureType_TextureType_Reserved = 7, + ETextureType_TextureType_SharedTextureHandle = 8, } ETextureType; typedef enum EColorSpace @@ -558,12 +592,19 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, ETrackedDeviceProperty_Prop_DevicePowerUsage_Float = 1052, ETrackedDeviceProperty_Prop_IgnoreMotionForStandby_Bool = 1053, + ETrackedDeviceProperty_Prop_ActualTrackingSystemName_String = 1054, + ETrackedDeviceProperty_Prop_AllowCameraToggle_Bool = 1055, + ETrackedDeviceProperty_Prop_AllowLightSourceFrequency_Bool = 1056, + ETrackedDeviceProperty_Prop_SteamRemoteClientID_Uint64 = 1057, + ETrackedDeviceProperty_Prop_Reserved_1058 = 1058, + ETrackedDeviceProperty_Prop_Reserved_1059 = 1059, + ETrackedDeviceProperty_Prop_Reserved_1060 = 1060, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003, ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004, - ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005, + ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64_deprecated = 0, ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006, ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007, ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008, @@ -646,10 +687,12 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_CameraExposureTime_Float = 2088, ETrackedDeviceProperty_Prop_CameraGlobalGain_Float = 2089, ETrackedDeviceProperty_Prop_DashboardScale_Float = 2091, - ETrackedDeviceProperty_Prop_PeerButtonInfo_String = 2092, ETrackedDeviceProperty_Prop_Hmd_SupportsHDR10_Bool = 2093, ETrackedDeviceProperty_Prop_Hmd_EnableParallelRenderCameras_Bool = 2094, ETrackedDeviceProperty_Prop_DriverProvidedChaperoneJson_String = 2095, + ETrackedDeviceProperty_Prop_ForceSystemLayerUseAppPoses_Bool = 2096, + ETrackedDeviceProperty_Prop_DashboardLinkSupport_Int32 = 2097, + ETrackedDeviceProperty_Prop_DisplayMinUIAnalogGain_Float = 2098, ETrackedDeviceProperty_Prop_IpdUIRangeMinMeters_Float = 2100, ETrackedDeviceProperty_Prop_IpdUIRangeMaxMeters_Float = 2101, ETrackedDeviceProperty_Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102, @@ -658,9 +701,15 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_Hmd_SupportsRoomViewDirect_Bool = 2105, ETrackedDeviceProperty_Prop_Hmd_SupportsAppThrottling_Bool = 2106, ETrackedDeviceProperty_Prop_Hmd_SupportsGpuBusMonitoring_Bool = 2107, - ETrackedDeviceProperty_Prop_DSCVersion_Int32 = 2110, - ETrackedDeviceProperty_Prop_DSCSliceCount_Int32 = 2111, - ETrackedDeviceProperty_Prop_DSCBPPx16_Int32 = 2112, + ETrackedDeviceProperty_Prop_DriverDisplaysIPDChanges_Bool = 2108, + ETrackedDeviceProperty_Prop_Reserved_2110 = 2110, + ETrackedDeviceProperty_Prop_Reserved_2111 = 2111, + ETrackedDeviceProperty_Prop_Reserved_2112 = 2112, + ETrackedDeviceProperty_Prop_Hmd_MaxDistortedTextureWidth_Int32 = 2113, + ETrackedDeviceProperty_Prop_Hmd_MaxDistortedTextureHeight_Int32 = 2114, + ETrackedDeviceProperty_Prop_Hmd_AllowSupersampleFiltering_Bool = 2115, + ETrackedDeviceProperty_Prop_Hmd_AllowsClientToControlTextureIndex = 2116, + ETrackedDeviceProperty_Prop_Reserved_2117 = 2117, ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, @@ -674,6 +723,14 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_Audio_DefaultRecordingDeviceId_String = 2301, ETrackedDeviceProperty_Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, ETrackedDeviceProperty_Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, + ETrackedDeviceProperty_Prop_Audio_DriverManagesPlaybackVolumeControl_Bool = 2304, + ETrackedDeviceProperty_Prop_Audio_DriverPlaybackVolume_Float = 2305, + ETrackedDeviceProperty_Prop_Audio_DriverPlaybackMute_Bool = 2306, + ETrackedDeviceProperty_Prop_Audio_DriverManagesRecordingVolumeControl_Bool = 2307, + ETrackedDeviceProperty_Prop_Audio_DriverRecordingVolume_Float = 2308, + ETrackedDeviceProperty_Prop_Audio_DriverRecordingMute_Bool = 2309, + ETrackedDeviceProperty_Prop_Audio_PipewirePlaybackNode_Int32 = 2400, + ETrackedDeviceProperty_Prop_Audio_PipewireRecordingNode_Int32 = 2401, ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, @@ -713,10 +770,19 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_HasDriverDirectModeComponent_Bool = 6005, ETrackedDeviceProperty_Prop_HasVirtualDisplayComponent_Bool = 6006, ETrackedDeviceProperty_Prop_HasSpatialAnchorsSupport_Bool = 6007, + ETrackedDeviceProperty_Prop_SupportsXrTextureSets_Bool = 6008, + ETrackedDeviceProperty_Prop_SupportsXrEyeGazeInteraction_Bool = 6009, + ETrackedDeviceProperty_Prop_DeviceHasNoIMU_Bool = 6010, + ETrackedDeviceProperty_Prop_UseAdvancedPrediction_Bool = 6011, ETrackedDeviceProperty_Prop_ControllerType_String = 7000, ETrackedDeviceProperty_Prop_ControllerHandSelectionPriority_Int32 = 7002, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000, ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999, + ETrackedDeviceProperty_Prop_Reserved_11000 = 11000, + ETrackedDeviceProperty_Prop_Reserved_11001 = 11001, + ETrackedDeviceProperty_Prop_Reserved_11002 = 11002, + ETrackedDeviceProperty_Prop_Reserved_11003 = 11003, + ETrackedDeviceProperty_Prop_Reserved_11004 = 11004, ETrackedDeviceProperty_Prop_TrackedDeviceProperty_Max = 1000000, } ETrackedDeviceProperty; @@ -756,11 +822,16 @@ typedef enum EVRSubmitFlags EVRSubmitFlags_Submit_Reserved = 4, EVRSubmitFlags_Submit_TextureWithPose = 8, EVRSubmitFlags_Submit_TextureWithDepth = 16, - EVRSubmitFlags_Submit_FrameDiscontinuty = 32, + EVRSubmitFlags_Submit_FrameDiscontinuity = 32, EVRSubmitFlags_Submit_VulkanTextureWithArrayData = 64, EVRSubmitFlags_Submit_GlArrayTexture = 128, + EVRSubmitFlags_Submit_IsEgl = 256, + EVRSubmitFlags_Submit_TextureWithMotion = 536, EVRSubmitFlags_Submit_Reserved2 = 32768, EVRSubmitFlags_Submit_Reserved3 = 65536, + EVRSubmitFlags_Submit_Reserved4 = 131072, + EVRSubmitFlags_Submit_Reserved5 = 262144, + EVRSubmitFlags_Submit_Reserved6 = 524288, } EVRSubmitFlags; typedef enum EVRState @@ -793,6 +864,8 @@ typedef enum EVREventType EVREventType_VREvent_PropertyChanged = 111, EVREventType_VREvent_WirelessDisconnect = 112, EVREventType_VREvent_WirelessReconnect = 113, + EVREventType_VREvent_Reserved_0114 = 114, + EVREventType_VREvent_Reserved_0115 = 115, EVREventType_VREvent_ButtonPress = 200, EVREventType_VREvent_ButtonUnpress = 201, EVREventType_VREvent_ButtonTouch = 202, @@ -826,7 +899,6 @@ typedef enum EVREventType EVREventType_VREvent_OverlayHidden = 501, EVREventType_VREvent_DashboardActivated = 502, EVREventType_VREvent_DashboardDeactivated = 503, - EVREventType_VREvent_DashboardRequested = 505, EVREventType_VREvent_ResetDashboard = 506, EVREventType_VREvent_ImageLoaded = 508, EVREventType_VREvent_ShowKeyboard = 509, @@ -853,6 +925,20 @@ typedef enum EVREventType EVREventType_VREvent_StartDashboard = 532, EVREventType_VREvent_ElevatePrism = 533, EVREventType_VREvent_OverlayClosed = 534, + EVREventType_VREvent_DashboardThumbChanged = 535, + EVREventType_VREvent_DesktopMightBeVisible = 536, + EVREventType_VREvent_DesktopMightBeHidden = 537, + EVREventType_VREvent_MutualSteamCapabilitiesChanged = 538, + EVREventType_VREvent_OverlayCreated = 539, + EVREventType_VREvent_OverlayDestroyed = 540, + EVREventType_VREvent_OverlayNameChanged = 544, + EVREventType_VREvent_TrackingRecordingStarted = 541, + EVREventType_VREvent_TrackingRecordingStopped = 542, + EVREventType_VREvent_SetTrackingRecordingPath = 543, + EVREventType_VREvent_Reserved_0560 = 560, + EVREventType_VREvent_Reserved_0561 = 561, + EVREventType_VREvent_Reserved_0562 = 562, + EVREventType_VREvent_Reserved_0563 = 563, EVREventType_VREvent_Notification_Shown = 600, EVREventType_VREvent_Notification_Hidden = 601, EVREventType_VREvent_Notification_BeginInteraction = 602, @@ -863,6 +949,7 @@ typedef enum EVREventType EVREventType_VREvent_DriverRequestedQuit = 704, EVREventType_VREvent_RestartRequested = 705, EVREventType_VREvent_InvalidateSwapTextureSets = 706, + EVREventType_VREvent_RequestDisconnectWirelessHMD = 707, EVREventType_VREvent_ChaperoneDataHasChanged = 800, EVREventType_VREvent_ChaperoneUniverseHasChanged = 801, EVREventType_VREvent_ChaperoneTempDataHasChanged = 802, @@ -870,8 +957,14 @@ typedef enum EVREventType EVREventType_VREvent_SeatedZeroPoseReset = 804, EVREventType_VREvent_ChaperoneFlushCache = 805, EVREventType_VREvent_ChaperoneRoomSetupStarting = 806, - EVREventType_VREvent_ChaperoneRoomSetupFinished = 807, + EVREventType_VREvent_ChaperoneRoomSetupCommitted = 807, EVREventType_VREvent_StandingZeroPoseReset = 808, + EVREventType_VREvent_Reserved_0809 = 809, + EVREventType_VREvent_Reserved_0810 = 810, + EVREventType_VREvent_Reserved_0811 = 811, + EVREventType_VREvent_Reserved_0812 = 812, + EVREventType_VREvent_Reserved_0813 = 813, + EVREventType_VREvent_Reserved_0814 = 814, EVREventType_VREvent_AudioSettingsHaveChanged = 820, EVREventType_VREvent_BackgroundSettingHasChanged = 850, EVREventType_VREvent_CameraSettingsHaveChanged = 851, @@ -895,6 +988,8 @@ typedef enum EVREventType EVREventType_VREvent_GpuSpeedSectionSettingChanged = 869, EVREventType_VREvent_WindowsMRSectionSettingChanged = 870, EVREventType_VREvent_OtherSectionSettingChanged = 871, + EVREventType_VREvent_AnyDriverSettingsChanged = 872, + EVREventType_VREvent_Reserved_0873 = 873, EVREventType_VREvent_StatusUpdate = 900, EVREventType_VREvent_WebInterface_InstallDriverCompleted = 950, EVREventType_VREvent_MCImageUpdated = 1000, @@ -903,6 +998,8 @@ typedef enum EVREventType EVREventType_VREvent_KeyboardClosed = 1200, EVREventType_VREvent_KeyboardCharInput = 1201, EVREventType_VREvent_KeyboardDone = 1202, + EVREventType_VREvent_KeyboardOpened_Global = 1203, + EVREventType_VREvent_KeyboardClosed_Global = 1204, EVREventType_VREvent_ApplicationListUpdated = 1303, EVREventType_VREvent_ApplicationMimeTypeLoad = 1304, EVREventType_VREvent_ProcessConnected = 1306, @@ -944,6 +1041,11 @@ typedef enum EVREventType EVREventType_VREvent_SystemReport_Started = 1900, EVREventType_VREvent_Monitor_ShowHeadsetView = 2000, EVREventType_VREvent_Monitor_HideHeadsetView = 2001, + EVREventType_VREvent_Audio_SetSpeakersVolume = 2100, + EVREventType_VREvent_Audio_SetSpeakersMute = 2101, + EVREventType_VREvent_Audio_SetMicrophoneVolume = 2102, + EVREventType_VREvent_Audio_SetMicrophoneMute = 2103, + EVREventType_VREvent_RenderModel_CountChanged = 2200, EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000, EVREventType_VREvent_VendorSpecific_Reserved_End = 19999, } EVREventType; @@ -1159,6 +1261,7 @@ typedef enum EVRNotificationError EVRNotificationError_VRNotificationError_NotificationQueueFull = 101, EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102, EVRNotificationError_VRNotificationError_SystemWithUserValueAlreadyExists = 103, + EVRNotificationError_VRNotificationError_ServiceUnavailable = 104, } EVRNotificationError; typedef enum EVRSkeletalMotionRange @@ -1248,6 +1351,8 @@ typedef enum EVRInitError EVRInitError_VRInitError_Init_VRDashboardTokenFailure = 165, EVRInitError_VRInitError_Init_VRDashboardEnvironmentFailure = 166, EVRInitError_VRInitError_Init_VRDashboardPathFailure = 167, + EVRInitError_VRInitError_Init_InstallationTooOld = 168, + EVRInitError_VRInitError_Init_ClientVersionAlreadyProvided = 169, EVRInitError_VRInitError_Driver_Failed = 200, EVRInitError_VRInitError_Driver_Unknown = 201, EVRInitError_VRInitError_Driver_HmdUnknown = 202, @@ -1370,6 +1475,11 @@ typedef enum EVRInitError EVRInitError_VRInitError_Compositor_SystemLayerCreateSession = 493, EVRInitError_VRInitError_Compositor_CreateInverseDistortUVs = 494, EVRInitError_VRInitError_Compositor_CreateBackbufferDepth = 495, + EVRInitError_VRInitError_Compositor_CannotDRMLeaseDisplay = 496, + EVRInitError_VRInitError_Compositor_CannotConnectToDisplayServer = 497, + EVRInitError_VRInitError_Compositor_GnomeNoDRMLeasing = 498, + EVRInitError_VRInitError_Compositor_FailedToInitializeEncoder = 499, + EVRInitError_VRInitError_Compositor_CreateBlurTexture = 500, EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, EVRInitError_VRInitError_VendorSpecific_OculusLinkNotEnabled = 1002, @@ -1388,6 +1498,10 @@ typedef enum EVRInitError EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, EVRInitError_VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, EVRInitError_VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115, + EVRInitError_VRInitError_VendorSpecific_Oasis_UnlockRequired = 1150, + EVRInitError_VRInitError_VendorSpecific_VRLink_OutdatedDriverMESA = 1200, + EVRInitError_VRInitError_VendorSpecific_VRLink_OutdatedDriverNVIDIA = 1201, + EVRInitError_VRInitError_VendorSpecific_VRLink_NoVideoSupport = 1202, EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000, EVRInitError_VRInitError_LastError = 2001, } EVRInitError; @@ -1476,6 +1590,17 @@ typedef enum Imu_OffScaleFlags Imu_OffScaleFlags_OffScale_GyroZ = 32, } Imu_OffScaleFlags; +typedef enum EVRDistortionChannel +{ + EVRDistortionChannel_Red = 0, + EVRDistortionChannel_Green = 1, + EVRDistortionChannel_Blue = 2, + EVRDistortionChannel_InverseRed = 3, + EVRDistortionChannel_InverseGreen = 4, + EVRDistortionChannel_InverseBlue = 5, + EVRDistortionChannel_Count = 6, +} EVRDistortionChannel; + typedef enum EVRApplicationError { EVRApplicationError_VRApplicationError_None = 0, @@ -1495,6 +1620,7 @@ typedef enum EVRApplicationError EVRApplicationError_VRApplicationError_TransitionAborted = 113, EVRApplicationError_VRApplicationError_IsTemplate = 114, EVRApplicationError_VRApplicationError_SteamVRIsExiting = 115, + EVRApplicationError_VRApplicationError_WaitingForChaperone = 116, EVRApplicationError_VRApplicationError_BufferTooSmall = 200, EVRApplicationError_VRApplicationError_PropertyNotSet = 201, EVRApplicationError_VRApplicationError_UnknownProperty = 202, @@ -1513,6 +1639,7 @@ typedef enum EVRApplicationProperty EVRApplicationProperty_VRApplicationProperty_Description_String = 50, EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51, EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52, + EVRApplicationProperty_VRApplicationProperty_ImagePathCapsule_String = 55, EVRApplicationProperty_VRApplicationProperty_Source_String = 53, EVRApplicationProperty_VRApplicationProperty_ActionManifestURL_String = 54, EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60, @@ -1575,6 +1702,13 @@ typedef enum EVRCompositorError EVRCompositorError_VRCompositorError_AlreadySet = 110, } EVRCompositorError; +typedef enum EVRCompositorTextureUsage +{ + EVRCompositorTextureUsage_VRCompositorTextureUsage_Left = 0, + EVRCompositorTextureUsage_VRCompositorTextureUsage_Right = 1, + EVRCompositorTextureUsage_VRCompositorTextureUsage_Both = 2, +} EVRCompositorTextureUsage; + typedef enum EVRCompositorTimingMode { EVRCompositorTimingMode_VRCompositorTimingMode_Implicit = 0, @@ -1622,7 +1756,13 @@ typedef enum VROverlayFlags VROverlayFlags_WantsModalBehavior = 1048576, VROverlayFlags_IsPremultiplied = 2097152, VROverlayFlags_IgnoreTextureAlpha = 4194304, - VROverlayFlags_Reserved = 67108864, + VROverlayFlags_EnableControlBar = 8388608, + VROverlayFlags_EnableControlBarKeyboard = 16777216, + VROverlayFlags_EnableControlBarClose = 33554432, + VROverlayFlags_MinimalControlBar = 67108864, + VROverlayFlags_EnableClickStabilization = 134217728, + VROverlayFlags_MultiCursor = 268435456, + VROverlayFlags_NoBackside = 536870912, } VROverlayFlags; typedef enum VRMessageOverlayResponse @@ -1659,6 +1799,8 @@ typedef enum EKeyboardFlags { EKeyboardFlags_KeyboardFlag_Minimal = 1, EKeyboardFlags_KeyboardFlag_Modal = 2, + EKeyboardFlags_KeyboardFlag_ShowArrowKeys = 4, + EKeyboardFlags_KeyboardFlag_HideDoneKey = 8, } EKeyboardFlags; typedef enum EDeviceType @@ -1726,6 +1868,7 @@ typedef enum EVRSettingsError EVRSettingsError_VRSettingsError_ReadFailed = 3, EVRSettingsError_VRSettingsError_JsonParseFailed = 4, EVRSettingsError_VRSettingsError_UnsetSettingHasNoDefault = 5, + EVRSettingsError_VRSettingsError_AccessDenied = 6, } EVRSettingsError; typedef enum EVRScreenshotError @@ -1871,6 +2014,7 @@ typedef PropertyContainerHandle_t DriverHandle_t; typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; typedef uint64_t VRInputValueHandle_t; +typedef uint64_t VRInputComponentHandle_t; typedef uint32_t VRComponentProperties; typedef uint64_t VROverlayHandle_t; typedef int32_t BoneIndex_t; @@ -1975,6 +2119,15 @@ typedef struct VRBoneTransform_t struct HmdQuaternionf_t orientation; } VRBoneTransform_t; +typedef struct VREyeTrackingData_t +{ + bool bActive; + bool bValid; + bool bTracked; + HmdVector3_t vGazeOrigin; + HmdVector3_t vGazeTarget; +} VREyeTrackingData_t; + typedef struct DistortionCoordinates_t { float rfRed[2]; //float[2] @@ -2029,6 +2182,39 @@ typedef struct VRTextureWithPoseAndDepth_t struct VRTextureDepthInfo_t depth; } VRTextureWithPoseAndDepth_t; +typedef struct VRTextureMotionInfo_t +{ + void * handle; // void * + struct HmdMatrix44_t mDeltaPose; +} VRTextureMotionInfo_t; + +typedef struct VRTextureWithMotion_t +{ + struct VRTextureMotionInfo_t motion; +} VRTextureWithMotion_t; + +typedef struct DmabufPlane_t +{ + uint32_t unOffset; + uint32_t unStride; + int32_t nFd; +} DmabufPlane_t; + +typedef struct DmabufAttributes_t +{ + void * pNext; // void * + uint32_t unWidth; + uint32_t unHeight; + uint32_t unDepth; + uint32_t unMipLevels; + uint32_t unArrayLayers; + uint32_t unSampleCount; + uint32_t unFormat; + uint64_t ulModifier; + uint32_t unPlaneCount; + struct DmabufPlane_t plane[4]; //struct vr::DmabufPlane_t[4] +} DmabufAttributes_t; + typedef struct TrackedDevicePose_t { struct HmdMatrix34_t mDeviceToAbsoluteTracking; @@ -2076,6 +2262,7 @@ typedef struct VREvent_Mouse_t float x; float y; uint32_t button; + uint32_t cursorIndex; } VREvent_Mouse_t; typedef struct VREvent_Scroll_t @@ -2084,6 +2271,7 @@ typedef struct VREvent_Scroll_t float ydelta; uint32_t unused; float viewportscale; + uint32_t cursorIndex; } VREvent_Scroll_t; typedef struct VREvent_TouchPadMove_t @@ -2115,6 +2303,7 @@ typedef struct VREvent_Overlay_t uint64_t overlayHandle; uint64_t devicePath; uint64_t memoryBlockId; + uint32_t cursorIndex; } VREvent_Overlay_t; typedef struct VREvent_Status_t @@ -2126,6 +2315,7 @@ typedef struct VREvent_Keyboard_t { char cNewInput[8]; //char[8] uint64_t uUserValue; + uint64_t overlayHandle; } VREvent_Keyboard_t; typedef struct VREvent_Ipd_t @@ -2135,7 +2325,7 @@ typedef struct VREvent_Ipd_t typedef struct VREvent_Chaperone_t { - uint64_t m_nPreviousUniverse; + uint64_t m_nPreviousUniverse_deprecated; uint64_t m_nCurrentUniverse; } VREvent_Chaperone_t; @@ -2253,6 +2443,16 @@ typedef struct VREvent_HDCPError_t enum EHDCPError eCode; } VREvent_HDCPError_t; +typedef struct VREvent_AudioVolumeControl_t +{ + float fVolumeLevel; +} VREvent_AudioVolumeControl_t; + +typedef struct VREvent_AudioMuteControl_t +{ + bool bMute; +} VREvent_AudioMuteControl_t; + typedef struct RenderModel_ComponentState_t { struct HmdMatrix34_t mTrackingToComponentRenderModel; @@ -2319,6 +2519,7 @@ typedef struct Compositor_FrameTiming TrackedDevicePose_t m_HmdPose; uint32_t m_nNumVSyncsReadyForUse; uint32_t m_nNumVSyncsToFirstView; + float m_flTransferLatencyMs; } Compositor_FrameTiming; typedef struct Compositor_BenchmarkResults @@ -2344,6 +2545,12 @@ typedef struct ImuSample_t uint32_t unOffScaleFlags; } ImuSample_t; +typedef struct DistortionCoordinate_t +{ + float u; + float v; +} DistortionCoordinate_t; + typedef struct AppOverrideKeys_t { char * pchKey; // const char * @@ -2596,6 +2803,7 @@ typedef struct COpenVRContext intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * intptr_t m_pVRDebug; // class vr::IVRDebug * intptr_t m_pVRNotifications; // class vr::IVRNotifications * + intptr_t m_pVRIPCResourceManagerClient; // class vr::IVRIPCResourceManagerClient * } COpenVRContext; typedef struct PropertyWrite_t @@ -2624,6 +2832,11 @@ typedef struct CVRPropertyHelpers intptr_t m_pProperties; // class vr::IVRProperties * } CVRPropertyHelpers; +typedef struct PathWriteOptions_t +{ + bool bPostEvents; +} PathWriteOptions_t; + typedef struct PathWrite_t { PathHandle_t ulPath; @@ -2634,6 +2847,8 @@ typedef struct PathWrite_t PropertyTypeTag_t unTag; enum ETrackedPropertyError eError; char * pszPath; // const char * + bool bPostEvents; + bool bValueChanged; } PathWrite_t; typedef struct PathRead_t @@ -2675,6 +2890,12 @@ typedef union VREvent_InputBindingLoad_t inputBinding; VREvent_InputActionManifestLoad_t actionManifest; VREvent_SpatialAnchor_t spatialAnchor; + VREvent_ProgressUpdate_t progressUpdate; + VREvent_ShowUI_t showUi; + VREvent_ShowDevTools_t showDevTools; + VREvent_HDCPError_t hdcpError; + VREvent_AudioVolumeControl_t audioVolumeControl; + VREvent_AudioMuteControl_t audioMuteControl; } VREvent_Data_t; #if defined(__linux__) || defined(__APPLE__) @@ -2719,6 +2940,7 @@ struct VR_IVRSystem_FnTable struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ); void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom); bool (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV, struct DistortionCoordinates_t * pDistortionCoordinates); + bool (OPENVR_FNTABLE_CALLTYPE *ComputeDistortionSet)(EVREye eEye, EVRDistortionChannel eChannel, bool bAsNormalizedDeviceCoordinates, uint32_t nNumCoordinates, struct DistortionCoordinate_t * pInput, struct DistortionCoordinate_t * pOutput); struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetEyeToHeadTransform)(EVREye eEye); bool (OPENVR_FNTABLE_CALLTYPE *GetTimeSinceLastVsync)(float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter); int32_t (OPENVR_FNTABLE_CALLTYPE *GetD3D9AdapterIndex)(); @@ -2746,8 +2968,11 @@ struct VR_IVRSystem_FnTable char * (OPENVR_FNTABLE_CALLTYPE *GetPropErrorNameFromEnum)(ETrackedPropertyError error); bool (OPENVR_FNTABLE_CALLTYPE *PollNextEvent)(struct VREvent_t * pEvent, uint32_t uncbVREvent); bool (OPENVR_FNTABLE_CALLTYPE *PollNextEventWithPose)(ETrackingUniverseOrigin eOrigin, struct VREvent_t * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose); + bool (OPENVR_FNTABLE_CALLTYPE *PollNextEventWithPoseAndOverlays)(ETrackingUniverseOrigin eOrigin, struct VREvent_t * pEvent, uint32_t uncbVREvent, struct TrackedDevicePose_t * pTrackedDevicePose, VROverlayHandle_t * pulOverlayHandle); char * (OPENVR_FNTABLE_CALLTYPE *GetEventTypeNameFromEnum)(EVREventType eType); struct HiddenAreaMesh_t (OPENVR_FNTABLE_CALLTYPE *GetHiddenAreaMesh)(EVREye eEye, EHiddenAreaMeshType type); + bool (OPENVR_FNTABLE_CALLTYPE *GetEyeTrackedFoveationCenter)(struct HmdVector2_t * pNdcLeft, struct HmdVector2_t * pNdcRight); + bool (OPENVR_FNTABLE_CALLTYPE *GetEyeTrackedFoveationCenterForProjection)(struct HmdMatrix44_t * pProjMat, struct HmdVector2_t * pNdc); bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize); bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize, struct TrackedDevicePose_t * pTrackedDevicePose); void (OPENVR_FNTABLE_CALLTYPE *TriggerHapticPulse)(TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec); @@ -2761,6 +2986,7 @@ struct VR_IVRSystem_FnTable void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_Exiting)(); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetAppContainerFilePaths)(char * pchBuffer, uint32_t unBufferSize); char * (OPENVR_FNTABLE_CALLTYPE *GetRuntimeVersion)(); + EVRInitError (OPENVR_FNTABLE_CALLTYPE *SetSDKVersion)(uint32_t nVersionMajor, uint32_t nVersionMinor, uint32_t nVersionBuild); }; struct VR_IVRExtendedDisplay_FnTable @@ -2819,6 +3045,7 @@ struct VR_IVRApplications_FnTable EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *PerformApplicationPrelaunchCheck)(char * pchAppKey); char * (OPENVR_FNTABLE_CALLTYPE *GetSceneApplicationStateNameFromEnum)(EVRSceneApplicationState state); EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchInternalProcess)(char * pchBinaryPath, char * pchArguments, char * pchWorkingDirectory); + EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *RegisterSubprocess)(uint32_t nPid); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneProcessId)(); }; @@ -2866,7 +3093,9 @@ struct VR_IVRCompositor_FnTable EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *WaitGetPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pOutputGamePose); + EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetSubmitTexture)(struct Texture_t * pOutTexture, bool * pNeedsFlush, EVRCompositorTextureUsage eUsage, struct Texture_t * pTexture, struct VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *Submit)(EVREye eEye, struct Texture_t * pTexture, struct VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); + EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SubmitWithArrayIndex)(EVREye eEye, struct Texture_t * pTexture, uint32_t unTextureArrayIndex, struct VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); void (OPENVR_FNTABLE_CALLTYPE *ClearLastSubmittedFrame)(); void (OPENVR_FNTABLE_CALLTYPE *PostPresentHandoff)(); bool (OPENVR_FNTABLE_CALLTYPE *GetFrameTiming)(struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo); @@ -2918,6 +3147,7 @@ struct VR_IVROverlay_FnTable { EVROverlayError (OPENVR_FNTABLE_CALLTYPE *FindOverlay)(char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateOverlay)(char * pchOverlayKey, char * pchOverlayName, VROverlayHandle_t * pOverlayHandle); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateSubviewOverlay)(VROverlayHandle_t parentOverlayHandle, char * pchSubviewOverlayKey, char * pchSubviewOverlayName, VROverlayHandle_t * pSubviewOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *DestroyOverlay)(VROverlayHandle_t ulOverlayHandle); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); @@ -2957,6 +3187,7 @@ struct VR_IVROverlay_FnTable EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformCursor)(VROverlayHandle_t ulCursorOverlayHandle, struct HmdVector2_t * pvHotspot); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformCursor)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvHotspot); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformProjection)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform, struct VROverlayProjection_t * pProjection, EVREye eEye); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetSubviewPosition)(VROverlayHandle_t ulOverlayHandle, float fX, float fY); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle); bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle); @@ -3102,6 +3333,8 @@ struct VR_IVRInput_FnTable EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalActionData)(VRActionHandle_t action, struct InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetDominantHand)(ETrackedControllerRole * peDominantHand); EVRInputError (OPENVR_FNTABLE_CALLTYPE *SetDominantHand)(ETrackedControllerRole eDominantHand); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetEyeTrackingDataRelativeToNow)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, VREyeTrackingData_t * pEyeTrackingData, uint32_t ulEyeTrackingDataSize); + EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetEyeTrackingDataForNextFrame)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, VREyeTrackingData_t * pEyeTrackingData, uint32_t ulEyeTrackingDataSize); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount); EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneName)(VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize); @@ -3150,6 +3383,20 @@ struct VR_IVRDebug_FnTable uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize); }; +struct VR_IVRIPCResourceManagerClient_FnTable +{ + bool (OPENVR_FNTABLE_CALLTYPE *NewSharedVulkanImage)(uint32_t nImageFormat, uint32_t nWidth, uint32_t nHeight, bool bRenderable, bool bMappable, bool bComputeAccess, uint32_t unMipLevels, uint32_t unArrayLayerCount, uint32_t unAdditionalVkCreateFlags, uint32_t unAdditionalVkUsageFlags, SharedTextureHandle_t * pSharedHandle); + bool (OPENVR_FNTABLE_CALLTYPE *NewSharedVulkanBuffer)(uint32_t nSize, uint32_t nUsageFlags, SharedTextureHandle_t * pSharedHandle); + bool (OPENVR_FNTABLE_CALLTYPE *NewSharedVulkanSemaphore)(bool bCounting, SharedTextureHandle_t * pSharedHandle); + bool (OPENVR_FNTABLE_CALLTYPE *RefResource)(SharedTextureHandle_t hSharedHandle, uint64_t * pNewIpcHandle); + bool (OPENVR_FNTABLE_CALLTYPE *UnrefResource)(SharedTextureHandle_t hSharedHandle); + bool (OPENVR_FNTABLE_CALLTYPE *GetDmabufFormats)(uint32_t * pOutFormatCount, uint32_t * pOutFormats); + bool (OPENVR_FNTABLE_CALLTYPE *GetDmabufModifiers)(EVRApplicationType eApplicationType, uint32_t unDRMFormat, uint32_t * pOutModifierCount, uint64_t * pOutModifiers); + bool (OPENVR_FNTABLE_CALLTYPE *ImportDmabuf)(EVRApplicationType eApplicationType, DmabufAttributes_t * pDmabufAttributes, SharedTextureHandle_t * pSharedHandle); + bool (OPENVR_FNTABLE_CALLTYPE *ReceiveSharedFd)(uint64_t ulIpcHandle, int * pOutFd); + void (OPENVR_FNTABLE_CALLTYPE *DestructIVRIPCResourceManagerClient)(); +}; + struct VR_IVRProperties_FnTable { ETrackedPropertyError (OPENVR_FNTABLE_CALLTYPE *ReadPropertyBatch)(PropertyContainerHandle_t ulContainerHandle, struct PropertyRead_t * pBatch, uint32_t unBatchEntryCount); diff --git a/third-party/openvr/headers/openvr_driver.h b/third-party/openvr/headers/openvr_driver.h index ee885beb..fcd67558 100644 --- a/third-party/openvr/headers/openvr_driver.h +++ b/third-party/openvr/headers/openvr_driver.h @@ -15,9 +15,9 @@ namespace vr { - static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 26; - static const uint32_t k_nSteamVRVersionBuild = 7; + static const uint32_t k_nSteamVRVersionMajor = 2; + static const uint32_t k_nSteamVRVersionMinor = 15; + static const uint32_t k_nSteamVRVersionBuild = 6; } // namespace vr // public_vrtypes.h @@ -104,6 +104,16 @@ struct VRBoneTransform_t HmdQuaternionf_t orientation; }; +struct VREyeTrackingData_t +{ + bool bActive; + bool bValid; + bool bTracked; + + vr::HmdVector3_t vGazeOrigin; // Ray origin + vr::HmdVector3_t vGazeTarget; // Gaze target (fixation point) +}; + /** Used to return the post-distortion UVs for each color channel. * UVs range from 0 to 1 with 0,0 in the upper left corner of the * source render target. The 0,0 to 1,1 range covers a single eye. */ @@ -133,6 +143,9 @@ enum ETextureType TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which // are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right // eye texture (vr::EVREye::Eye_Right) + + TextureType_Reserved = 7, + TextureType_SharedTextureHandle = 8, // A pointer to a vr::SharedTextureHandle_t that was imported via, eg. ImportDmabuf. }; enum EColorSpace @@ -180,6 +193,17 @@ struct VRTextureWithPoseAndDepth_t : public VRTextureWithPose_t VRTextureDepthInfo_t depth; }; +struct VRTextureMotionInfo_t +{ + void *handle; // See ETextureType definition above + HmdMatrix44_t mDeltaPose; // Incremental application-applied transform, if any, since the previous frame that affects the view. +}; + +struct VRTextureWithMotion_t : VRTextureWithPoseAndDepth_t +{ + VRTextureMotionInfo_t motion; +}; + // 64-bit types that are part of public structures // that are replicated in shared memory. #if defined(__linux__) || defined(__APPLE__) @@ -190,6 +214,32 @@ typedef uint64_t vrshared_uint64_t; typedef double vrshared_double; #endif +static const uint32_t MaxDmabufPlaneCount = 4; + +struct DmabufPlane_t +{ + uint32_t unOffset; + uint32_t unStride; + int32_t nFd; // This is not consumed, it is dup'ed. +}; + +struct DmabufAttributes_t +{ + void *pNext; // MUST be NULL. Unused right now, but could be used to extend this structure in the future. + + uint32_t unWidth; + uint32_t unHeight; + uint32_t unDepth; + uint32_t unMipLevels; + uint32_t unArrayLayers; + uint32_t unSampleCount; + uint32_t unFormat; // DRM_FORMAT_ + uint64_t ulModifier; // DRM_FORMAT_MOD_ + + uint32_t unPlaneCount; + DmabufPlane_t plane[MaxDmabufPlaneCount]; +}; + #pragma pack( pop ) } // namespace vr @@ -432,6 +482,13 @@ enum ETrackedDeviceProperty Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, Prop_DevicePowerUsage_Float = 1052, Prop_IgnoreMotionForStandby_Bool = 1053, + Prop_ActualTrackingSystemName_String = 1054, // the literal local driver name in case someone is playing games with prop 1000 + Prop_AllowCameraToggle_Bool = 1055, // Shows the Enable/Disable camera option. Hide this for certain headsets if they have the camera tracking (since it's always on) + Prop_AllowLightSourceFrequency_Bool = 1056, // Shows the Anti-Flicker option in camera settings. + Prop_SteamRemoteClientID_Uint64 = 1057, // For vrlink + Prop_Reserved_1058 = 1058, + Prop_Reserved_1059 = 1059, + Prop_Reserved_1060 = 1060, // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -439,7 +496,7 @@ enum ETrackedDeviceProperty Prop_DisplayFrequency_Float = 2002, Prop_UserIpdMeters_Float = 2003, Prop_CurrentUniverseId_Uint64 = 2004, - Prop_PreviousUniverseId_Uint64 = 2005, + Prop_PreviousUniverseId_Uint64_deprecated = Prop_Invalid, Prop_DisplayFirmwareVersion_Uint64 = 2006, Prop_IsOnDesktop_Bool = 2007, Prop_DisplayMCType_Int32 = 2008, @@ -524,10 +581,13 @@ enum ETrackedDeviceProperty Prop_CameraGlobalGain_Float = 2089, // Prop_DashboardLayoutPathName_String = 2090, // DELETED Prop_DashboardScale_Float = 2091, - Prop_PeerButtonInfo_String = 2092, + // Prop_PeerButtonInfo_String = 2092, // DELETED Prop_Hmd_SupportsHDR10_Bool = 2093, Prop_Hmd_EnableParallelRenderCameras_Bool = 2094, Prop_DriverProvidedChaperoneJson_String = 2095, // higher priority than Prop_DriverProvidedChaperonePath_String + Prop_ForceSystemLayerUseAppPoses_Bool = 2096, + Prop_DashboardLinkSupport_Int32 = 2097, + Prop_DisplayMinUIAnalogGain_Float = 2098, Prop_IpdUIRangeMinMeters_Float = 2100, Prop_IpdUIRangeMaxMeters_Float = 2101, @@ -537,10 +597,18 @@ enum ETrackedDeviceProperty Prop_Hmd_SupportsRoomViewDirect_Bool = 2105, Prop_Hmd_SupportsAppThrottling_Bool = 2106, Prop_Hmd_SupportsGpuBusMonitoring_Bool = 2107, + Prop_DriverDisplaysIPDChanges_Bool = 2108, + // Prop_Driver_RecenterSupport_Int32 = 2109, // DELETED + Prop_Reserved_2110 = 2110, + Prop_Reserved_2111 = 2111, + Prop_Reserved_2112 = 2112, + + Prop_Hmd_MaxDistortedTextureWidth_Int32 = 2113, + Prop_Hmd_MaxDistortedTextureHeight_Int32 = 2114, + Prop_Hmd_AllowSupersampleFiltering_Bool = 2115, - Prop_DSCVersion_Int32 = 2110, - Prop_DSCSliceCount_Int32 = 2111, - Prop_DSCBPPx16_Int32 = 2112, + Prop_Hmd_AllowsClientToControlTextureIndex = 2116, + Prop_Reserved_2117 = 2117, // Driver requested mura correction properties Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, @@ -553,10 +621,20 @@ enum ETrackedDeviceProperty Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, - Prop_Audio_DefaultPlaybackDeviceId_String = 2300, - Prop_Audio_DefaultRecordingDeviceId_String = 2301, - Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, - Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, + Prop_Audio_DriverManagesPlaybackVolumeControl_Bool = 2304, + Prop_Audio_DriverPlaybackVolume_Float = 2305, + Prop_Audio_DriverPlaybackMute_Bool = 2306, + Prop_Audio_DriverManagesRecordingVolumeControl_Bool = 2307, + Prop_Audio_DriverRecordingVolume_Float = 2308, + Prop_Audio_DriverRecordingMute_Bool = 2309, + + // Pipewire Audio Stuff + Prop_Audio_PipewirePlaybackNode_Int32 = 2400, + Prop_Audio_PipewireRecordingNode_Int32 = 2401, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -605,7 +683,11 @@ enum ETrackedDeviceProperty Prop_HasCameraComponent_Bool = 6004, Prop_HasDriverDirectModeComponent_Bool = 6005, Prop_HasVirtualDisplayComponent_Bool = 6006, - Prop_HasSpatialAnchorsSupport_Bool = 6007, + Prop_HasSpatialAnchorsSupport_Bool = 6007, + Prop_SupportsXrTextureSets_Bool = 6008, + Prop_SupportsXrEyeGazeInteraction_Bool = 6009, + Prop_DeviceHasNoIMU_Bool = 6010, + Prop_UseAdvancedPrediction_Bool = 6011, // Properties that are set internally based on other information provided by drivers Prop_ControllerType_String = 7000, @@ -616,6 +698,13 @@ enum ETrackedDeviceProperty Prop_VendorSpecific_Reserved_Start = 10000, Prop_VendorSpecific_Reserved_End = 10999, + // Addl SteamVR Reserved Space + Prop_Reserved_11000 = 11000, + Prop_Reserved_11001 = 11001, + Prop_Reserved_11002 = 11002, + Prop_Reserved_11003 = 11003, + Prop_Reserved_11004 = 11004, + Prop_TrackedDeviceProperty_Max = 1000000, }; @@ -656,10 +745,12 @@ enum EHmdTrackingStyle typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; typedef uint64_t VRInputValueHandle_t; +typedef uint64_t VRInputComponentHandle_t; static const VRActionHandle_t k_ulInvalidActionHandle = 0; static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0; static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0; +static const VRInputComponentHandle_t k_ulInvalidInputComponentHandle = 0; /** Allows the application to control how scene textures are used by the compositor when calling Submit. */ @@ -689,7 +780,7 @@ enum EVRSubmitFlags // Set to indicate a discontinuity between this and the last frame. // This will prevent motion smoothing from attempting to extrapolate using the pair. - Submit_FrameDiscontinuty = 0x20, + Submit_FrameDiscontinuity = 0x20, // Set to indicate that pTexture->handle is a contains VRVulkanTextureArrayData_t Submit_VulkanTextureWithArrayData = 0x40, @@ -697,10 +788,18 @@ enum EVRSubmitFlags // If the texture pointer passed in is an OpenGL Array texture, set this flag Submit_GlArrayTexture = 0x80, + // If the texture is an EGL texture and not an glX/wGL texture (Linux only, currently) + Submit_IsEgl = 0x100, + + // Set to indicate that pTexture is a pointer to a VRTextureWithMotion_t. + Submit_TextureWithMotion = 0x200 | Submit_TextureWithPose | Submit_TextureWithDepth, + // Do not use Submit_Reserved2 = 0x08000, Submit_Reserved3 = 0x10000, - + Submit_Reserved4 = 0x20000, + Submit_Reserved5 = 0x40000, + Submit_Reserved6 = 0x80000, }; /** Data required for passing Vulkan textures to IVRCompositor::Submit. @@ -768,6 +867,8 @@ enum EVREventType VREvent_PropertyChanged = 111, VREvent_WirelessDisconnect = 112, VREvent_WirelessReconnect = 113, + VREvent_Reserved_0114 = 114, + VREvent_Reserved_0115 = 115, VREvent_ButtonPress = 200, // data is controller VREvent_ButtonUnpress = 201, // data is controller @@ -793,8 +894,8 @@ enum EVREventType VREvent_OverlayFocusChanged = 307, // data is overlay, global event VREvent_ReloadOverlays = 308, VREvent_ScrollSmooth = 309, // data is scroll - VREvent_LockMousePosition = 310, - VREvent_UnlockMousePosition = 311, + VREvent_LockMousePosition = 310, // data is mouse + VREvent_UnlockMousePosition = 311, // data is mouse VREvent_InputFocusCaptured = 400, // data is process DEPRECATED VREvent_InputFocusReleased = 401, // data is process DEPRECATED @@ -817,12 +918,12 @@ enum EVREventType VREvent_ConsoleOpened = 420, VREvent_ConsoleClosed = 421, - VREvent_OverlayShown = 500, - VREvent_OverlayHidden = 501, + VREvent_OverlayShown = 500, // Indicates that an overlay is now visible to someone and should be rendering normally. Reflects IVROverlay::IsOverlayVisible() becoming true. + VREvent_OverlayHidden = 501, // Indicates that an overlay is no longer visible to someone and doesn't need to render frames. Reflects IVROverlay::IsOverlayVisible() becoming false. VREvent_DashboardActivated = 502, VREvent_DashboardDeactivated = 503, //VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent - VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + //VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay VREvent_ResetDashboard = 506, // Send to the overlay manager //VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID -- no longer sent VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading @@ -846,8 +947,8 @@ enum EVREventType VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted VREvent_PrimaryDashboardDeviceChanged = 525, - VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled - VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled + VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled (for scene apps only - not for construct or transient bounds) + VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled (for scene apps only - not for construct or transient bounds) VREvent_ShowUI = 528, // data is showUi VREvent_ShowDevTools = 529, // data is showDevTools VREvent_DesktopViewUpdating = 530, @@ -855,8 +956,23 @@ enum EVREventType VREvent_StartDashboard = 532, VREvent_ElevatePrism = 533, - - VREvent_OverlayClosed = 534, + VREvent_OverlayClosed = 534, // The overlay's close button is pressed. + VREvent_DashboardThumbChanged = 535, // Sent when a dashboard thumbnail image changes + VREvent_DesktopMightBeVisible = 536, // Sent when any known desktop related overlay is visible + VREvent_DesktopMightBeHidden = 537, // Sent when all known desktop related overlays are hidden + VREvent_MutualSteamCapabilitiesChanged = 538, // Sent when the set of capabilities common between both Steam and SteamVR have changed. + VREvent_OverlayCreated = 539, // An OpenVR overlay of any sort was created. Data is overlay. + VREvent_OverlayDestroyed = 540, // An OpenVR overlay of any sort was destroyed. Data is overlay. + VREvent_OverlayNameChanged = 544, // An OpenVR overlay's name changed. Data is overlay. + + VREvent_TrackingRecordingStarted = 541, + VREvent_TrackingRecordingStopped = 542, + VREvent_SetTrackingRecordingPath = 543, + + VREvent_Reserved_0560 = 560, // No data + VREvent_Reserved_0561 = 561, // No data + VREvent_Reserved_0562 = 562, // No data + VREvent_Reserved_0563 = 563, // No data VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -870,6 +986,7 @@ enum EVREventType VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR VREvent_InvalidateSwapTextureSets = 706, + VREvent_RequestDisconnectWirelessHMD = 707, // vrserver asks vrlink to disconnect VREvent_ChaperoneDataHasChanged = 800, // this will never happen with the new chaperone system VREvent_ChaperoneUniverseHasChanged = 801, @@ -878,8 +995,14 @@ enum EVREventType VREvent_SeatedZeroPoseReset = 804, VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() VREvent_ChaperoneRoomSetupStarting = 806, // Triggered by CVRChaperoneClient::RoomSetupStarting - VREvent_ChaperoneRoomSetupFinished = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy + VREvent_ChaperoneRoomSetupCommitted = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy (formerly VREvent_ChaperoneRoomSetupFinished) VREvent_StandingZeroPoseReset = 808, + VREvent_Reserved_0809 = 809, + VREvent_Reserved_0810 = 810, + VREvent_Reserved_0811 = 811, + VREvent_Reserved_0812 = 812, + VREvent_Reserved_0813 = 813, + VREvent_Reserved_0814 = 814, VREvent_AudioSettingsHaveChanged = 820, @@ -905,6 +1028,8 @@ enum EVREventType VREvent_GpuSpeedSectionSettingChanged = 869, VREvent_WindowsMRSectionSettingChanged = 870, VREvent_OtherSectionSettingChanged = 871, + VREvent_AnyDriverSettingsChanged = 872, + VREvent_Reserved_0873 = 873, VREvent_StatusUpdate = 900, @@ -915,9 +1040,11 @@ enum EVREventType VREvent_FirmwareUpdateStarted = 1100, VREvent_FirmwareUpdateFinished = 1101, - VREvent_KeyboardClosed = 1200, - VREvent_KeyboardCharInput = 1201, - VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + VREvent_KeyboardClosed = 1200, // DEPRECATED: Sent only to the overlay it closed for, or globally if it was closed for a scene app + VREvent_KeyboardCharInput = 1201, // Sent on keyboard input. Warning: event type appears as both global event and overlay event + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard. Warning: event type appears as both global event and overlay event + VREvent_KeyboardOpened_Global = 1203, // Sent globally when the keyboard is opened. data.keyboard.overlayHandle is who it was opened for (scene app if k_ulOverlayHandleInvalid) + VREvent_KeyboardClosed_Global = 1204, // Sent globally when the keyboard is closed. data.keyboard.overlayHandle is who it was opened for (scene app if k_ulOverlayHandleInvalid) //VREvent_ApplicationTransitionStarted = 1300, //VREvent_ApplicationTransitionAborted = 1301, @@ -975,6 +1102,13 @@ enum EVREventType VREvent_Monitor_ShowHeadsetView = 2000, // data is process VREvent_Monitor_HideHeadsetView = 2001, // data is process + VREvent_Audio_SetSpeakersVolume = 2100, + VREvent_Audio_SetSpeakersMute = 2101, + VREvent_Audio_SetMicrophoneVolume = 2102, + VREvent_Audio_SetMicrophoneMute = 2103, + + VREvent_RenderModel_CountChanged = 2200, //Number of RenderModels in the system has changed + // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, @@ -1056,6 +1190,10 @@ struct VREvent_Mouse_t { float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 uint32_t button; // EVRMouseButton enum + + // if from an event triggered by cursor input on an overlay that supports multiple cursors, this is the index of + // which tracked cursor the event is for + uint32_t cursorIndex; }; /** used for simulated mouse wheel scroll */ @@ -1064,6 +1202,10 @@ struct VREvent_Scroll_t float xdelta, ydelta; uint32_t unused; float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1] + + // if from an event triggered by cursor input on an overlay that supports multiple cursors, this is the index of + // which tracked cursor the event is for + uint32_t cursorIndex; }; /** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger @@ -1108,9 +1250,13 @@ struct VREvent_Process_t /** Used for a few events about overlays */ struct VREvent_Overlay_t { - uint64_t overlayHandle; + uint64_t overlayHandle; // VROverlayHandle_t uint64_t devicePath; uint64_t memoryBlockId; + + // if from an event triggered by cursor input on an overlay that supports multiple cursors, this is the index of + // which tracked cursor the event is for + uint32_t cursorIndex; }; @@ -1120,11 +1266,12 @@ struct VREvent_Status_t uint32_t statusState; // EVRState enum }; -/** Used for keyboard events **/ +/** Used for keyboard events */ struct VREvent_Keyboard_t { - char cNewInput[8]; // Up to 11 bytes of new input - uint64_t uUserValue; // Possible flags about the new input + char cNewInput[8]; // 7 bytes of utf8 + null + uint64_t uUserValue; // caller specified opaque token + uint64_t overlayHandle; // VROverlayHandle_t }; struct VREvent_Ipd_t @@ -1134,7 +1281,7 @@ struct VREvent_Ipd_t struct VREvent_Chaperone_t { - uint64_t m_nPreviousUniverse; + uint64_t m_nPreviousUniverse_deprecated; uint64_t m_nCurrentUniverse; }; @@ -1274,6 +1421,16 @@ struct VREvent_HDCPError_t EHDCPError eCode; }; +struct VREvent_AudioVolumeControl_t +{ + float fVolumeLevel; +}; + +struct VREvent_AudioMuteControl_t +{ + bool bMute; +}; + typedef union { VREvent_Reserved_t reserved; @@ -1305,7 +1462,9 @@ typedef union VREvent_ShowUI_t showUi; VREvent_ShowDevTools_t showDevTools; VREvent_HDCPError_t hdcpError; - /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ + VREvent_AudioVolumeControl_t audioVolumeControl; + VREvent_AudioMuteControl_t audioMuteControl; + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ } VREvent_Data_t; @@ -1587,6 +1746,7 @@ enum EVRNotificationError VRNotificationError_NotificationQueueFull = 101, VRNotificationError_InvalidOverlayHandle = 102, VRNotificationError_SystemWithUserValueAlreadyExists = 103, + VRNotificationError_ServiceUnavailable = 104, }; @@ -1705,6 +1865,8 @@ enum EVRInitError VRInitError_Init_VRDashboardTokenFailure = 165, VRInitError_Init_VRDashboardEnvironmentFailure = 166, VRInitError_Init_VRDashboardPathFailure = 167, + VRInitError_Init_InstallationTooOld = 168, + VRInitError_Init_ClientVersionAlreadyProvided = 169, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1833,6 +1995,11 @@ enum EVRInitError VRInitError_Compositor_SystemLayerCreateSession = 493, VRInitError_Compositor_CreateInverseDistortUVs = 494, VRInitError_Compositor_CreateBackbufferDepth = 495, + VRInitError_Compositor_CannotDRMLeaseDisplay = 496, + VRInitError_Compositor_CannotConnectToDisplayServer = 497, + VRInitError_Compositor_GnomeNoDRMLeasing = 498, + VRInitError_Compositor_FailedToInitializeEncoder = 499, + VRInitError_Compositor_CreateBlurTexture = 500, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, @@ -1854,6 +2021,12 @@ enum EVRInitError VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115, + VRInitError_VendorSpecific_Oasis_UnlockRequired = 1150, + + VRInitError_VendorSpecific_VRLink_OutdatedDriverMESA = 1200, + VRInitError_VendorSpecific_VRLink_OutdatedDriverNVIDIA = 1201, + VRInitError_VendorSpecific_VRLink_NoVideoSupport = 1202, + VRInitError_Steam_SteamInstallationNotFound = 2000, // Strictly a placeholder @@ -1949,28 +2122,31 @@ 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, +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_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame -const uint32_t VRCompositor_PredictionMask = 0xF0; // 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 +const uint32_t VRCompositor_PredictionMask = 0xF0; // The runtime may predict more than one frame ahead if + // it detects the application is taking too long to render. These // 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 = 0xF00; // Number of frames the compositor is throttling the application. +const uint32_t VRCompositor_ThrottleMask = 0xF00; // 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 ) >> 8 ) +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( push, 4 ) +#endif /** Provides a single frame's timing information to the app */ struct Compositor_FrameTiming { @@ -2013,7 +2189,12 @@ struct Compositor_FrameTiming uint32_t m_nNumVSyncsReadyForUse; uint32_t m_nNumVSyncsToFirstView; + + float m_flTransferLatencyMs; }; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif /** Provides compositor benchmark results to the app */ struct Compositor_BenchmarkResults @@ -2070,6 +2251,22 @@ struct ImuSample_t uint32_t unOffScaleFlags; }; +enum class EVRDistortionChannel : uint32_t +{ + Red = 0, // given a coordinate in distorted panel space, returns the coordinate to sample in rectilinear render space for the red channel + Green, // given a coordinate in distorted panel space, returns the coordinate to sample in rectilinear render space for the green channel + Blue, // given a coordinate in distorted panel space, returns the coordinate to sample in rectilinear render space for the blue channel + InverseRed, // given a coordinate in rectilinear render space, returns the corresponding coordinate in distorted panel space for the red channel + InverseGreen, // given a coordinate in rectilinear render space, returns the corresponding coordinate in distorted panel space for the green channel + InverseBlue, // given a coordinate in rectilinear render space, returns the corresponding coordinate in distorted panel space for the blue channel + Count +}; + +struct DistortionCoordinate_t +{ + float u, v; // 0..1 +}; + #pragma pack( pop ) // figure out how to import from the VR API dll @@ -2237,7 +2434,9 @@ VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t // ivrsettings.h +#ifndef OPENVR_NO_STL #include +#endif namespace vr { @@ -2249,6 +2448,7 @@ namespace vr VRSettingsError_ReadFailed = 3, VRSettingsError_JsonParseFailed = 4, VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + VRSettingsError_AccessDenied = 6, }; // The maximum length of a settings key @@ -2309,10 +2509,12 @@ namespace vr { m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError ); } +#ifndef OPENVR_NO_STL void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr ) { m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError ); } +#endif bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) { @@ -2330,6 +2532,7 @@ namespace vr { m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError ); } +#ifndef OPENVR_NO_STL std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr ) { char buf[4096]; @@ -2342,6 +2545,7 @@ namespace vr else return ""; } +#endif void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) { @@ -2357,6 +2561,7 @@ namespace vr //----------------------------------------------------------------------------- // steamvr keys static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_Contrast_Float = "contrast"; static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; @@ -2374,6 +2579,7 @@ namespace vr static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; + static const char * const k_pch_SteamVR_StartColor_String = "startColor"; static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; static const char * const k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences"; static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; @@ -2386,10 +2592,17 @@ namespace vr static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + static const char * const k_pch_SteamVR_FoveatedSharpening_Bool = "sharpening"; + static const char * const k_pch_SteamVR_FoveatedSharpeningOverride_Int32 = "sharpeningOverride"; static const char * const k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle"; static const char * const k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict"; static const char * const k_pch_SteamVR_WorldScale_Float = "worldScale"; static const char * const k_pch_SteamVR_FovScale_Int32 = "fovScale"; + static const char * const k_pch_SteamVR_FovScaleInner_Int32 = "fovScaleInner"; + static const char * const k_pch_SteamVR_FovScaleUpper_Int32 = "fovScaleUpper"; + static const char * const k_pch_SteamVR_FovScaleLower_Int32 = "fovScaleLower"; + static const char * const k_pch_SteamVR_FovScaleFormat_Int32 = "fovScaleFormat"; + static const char * const k_pch_SteamVR_FovScaleLetterboxed_Bool = "fovScaleLetterboxed"; static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; @@ -2413,7 +2626,6 @@ namespace vr static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; - static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; @@ -2434,6 +2646,13 @@ namespace vr static const char * const k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility"; static const char * const k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode"; static const char * const k_pch_SteamVR_UsePrism_Bool = "usePrism"; + static const char * const k_pch_SteamVR_AllowFallbackMirrorWindowLinux_Bool = "allowFallbackMirrorWindowLinux"; + static const char * const k_pch_SteamVR_DisableKeyboardPrivacy_Bool = "disableKeyboardPrivacy"; + + //----------------------------------------------------------------------------- + // openxr keys + static const char * const k_pch_OpenXR_Section = "openxr"; + static const char * const k_pch_OpenXR_MetaUnityPluginCompatibility_Int32 = "metaUnityPluginCompatibility"; //----------------------------------------------------------------------------- // direct mode keys @@ -2484,6 +2703,8 @@ namespace vr static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + static const char * const k_pch_UserInterface_CheckStatusInterval_Int = "vrmStatusCheckInterval"; + static const char * const k_pch_UserInterface_CheckForSteam_Bool = "vrmCheckForSteam"; //----------------------------------------------------------------------------- // notification keys @@ -2571,6 +2792,7 @@ namespace vr static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; + static const char * const k_pch_Power_OverrideWindowsPowerScheme_Bool = "overrideWindowsPowerScheme"; //----------------------------------------------------------------------------- // dashboard keys @@ -2578,11 +2800,13 @@ namespace vr static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; static const char * const k_pch_Dashboard_Position = "position"; - static const char * const k_pch_Dashboard_DesktopScale = "desktopScale"; static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale"; static const char * const k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer"; - static const char * const k_pch_Dashboard_StickyDashboard = "stickyDashboard"; static const char * const k_pch_Dashboard_AllowSteamOverlays_Bool = "allowSteamOverlays"; + static const char * const k_pch_Dashboard_AllowVRGamepadUI_Bool = "allowVRGamepadUI"; + static const char * const k_pch_Dashboard_SteamMatchesHMDFramerate = "steamMatchesHMDFramerate"; + static const char * const k_pch_Dashboard_GrabHandleAcceleration = "grabHandleAcceleration"; + static const char * const k_pch_Dashboard_OverlayBacksideColor_String = "overlayBacksideColor"; //----------------------------------------------------------------------------- // model skin keys @@ -2593,6 +2817,8 @@ namespace vr static const char * const k_pch_Driver_Enable_Bool = "enable"; static const char * const k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; + static const char * const k_pch_Driver_Hmd_AllowsClientToControlTextureIndex_Bool = "hmdAllowsClientToControlTextureIndex"; + static const char * const k_pch_Driver_ForceSystemLayerUseAppPoses_Bool = "forceSystemLayerUseAppPoses"; //----------------------------------------------------------------------------- // web interface keys @@ -2633,7 +2859,10 @@ namespace vr // Last known keys for righting recovery static const char * const k_pch_LastKnown_Section = "LastKnown"; static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; - static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + static const char *const k_pch_LastKnown_HMDModel_String = "HMDModel"; + static const char* const k_pch_LastKnown_ActualHMDDriver_String = "ActualHMDDriver"; + static const char* const k_pch_LastKnown_HMDSerialNumber_String = "HMDSerialNumber"; + static const char* const k_pch_LastKnown_HMDRemoteClientID_String = "RemoteClientID"; // uint64 in string //----------------------------------------------------------------------------- // Dismissed warnings @@ -2650,6 +2879,10 @@ namespace vr // Log of GPU performance static const char * const k_pch_GpuSpeed_Section = "GpuSpeed"; + //----------------------------------------------------------------------------- + // OpenXR Render Model Extension keys + static const char *const k_pch_XRRenderModelCache_Section = "XRRenderModelUuidCache"; + } // namespace vr // iservertrackeddevicedriver.h @@ -2764,9 +2997,7 @@ class ITrackedDeviceServerDriver * exceed the length of the supplied buffer should be truncated and null terminated */ virtual void DebugRequest( const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; - // ------------------------------------ - // Tracking Methods - // ------------------------------------ + /** This interface is unused, and will never be called. */ virtual DriverPose_t GetPose() = 0; }; @@ -2816,9 +3047,12 @@ namespace vr * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + /** Computes the result of the inverse distortion function for the specified eye, channel, and input UV. + * Operation can fail, returns success/failure, on success result is stored in *pResult */ + virtual bool ComputeInverseDistortion( HmdVector2_t *pResult, EVREye eEye, uint32_t unChannel, float fU, float fV ) = 0; }; - static const char *IVRDisplayComponent_Version = "IVRDisplayComponent_002"; + static const char *IVRDisplayComponent_Version = "IVRDisplayComponent_003"; } @@ -2885,6 +3119,9 @@ namespace vr // Hmd pose used to render this layer. vr::HmdMatrix34_t mHmdPose; + + // Time in seconds from now that mHmdPose was predicted to. + float flHmdPosePredictionTimeInSecondsFromNow; }; virtual void SubmitLayer( const SubmitLayerPerEye_t( &perEye )[ 2 ] ) {} @@ -2901,10 +3138,15 @@ namespace vr virtual void PostPresent( const Throttling_t *pThrottling ) {} /** Called to get additional frame timing stats from driver. Check m_nSize for versioning (new members will be added to end only). */ - virtual void GetFrameTiming( DriverDirectMode_FrameTiming *pFrameTiming ) {} + virtual void GetFrameTiming( DriverDirectMode_FrameTiming *pFrameTiming ) + { + /** VRCompositor_ReprojectionMotion_XXX flags get passed in, and since these overlap with VRCompositor_ThrottleMask, they need + * to be cleared out if this function isn't implemented; otherwise, those settings will get interpreted as throttling. */ + pFrameTiming->m_nReprojectionFlags = 0; + } }; - static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_008"; + static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_009"; } @@ -3131,6 +3373,10 @@ class CVRPropertyHelpers public: CVRPropertyHelpers( IVRProperties * pProperties ) : m_pProperties( pProperties ) {} + /** Gets the typed property according to the caller's expected return type. */ + template + T GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ); + /** Returns a scaler property. If the device index is not valid or the property value type does not match, * this function will return false. */ bool GetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ); @@ -3147,7 +3393,6 @@ class CVRPropertyHelpers * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ uint32_t GetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() void *pvBuffer, uint32_t unBufferSize, PropertyTypeTag_t *punTag, ETrackedPropertyError *pError = 0L ); - /** Returns a string 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 * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ @@ -3200,6 +3445,71 @@ class CVRPropertyHelpers }; +/** Returns a string property as a std::string. If the device index is not valid or the property is not a string type this function will +* return an empty string. */ +template <> +inline std::string CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetStringProperty( ulContainer, prop, peError ); +} + + +template <> +inline bool CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetBoolProperty( ulContainer, prop, peError ); +} + + +template <> +inline float CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetFloatProperty( ulContainer, prop, peError ); +} + + +template <> +inline int32_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetInt32Property( ulContainer, prop, peError ); +} + + +template <> +inline uint64_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetUint64Property( ulContainer, prop, peError ); +} + + +template <> +inline HmdVector2_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetVec2Property( ulContainer, prop, peError ); +} + + +template <> +inline HmdVector3_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetVec3Property( ulContainer, prop, peError ); +} + + +template <> +inline HmdVector4_t CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetVec4Property( ulContainer, prop, peError ); +} + + +template <> +inline double CVRPropertyHelpers::GetTypedProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError ) +{ + return GetDoubleProperty( ulContainer, prop, peError ); +} + + inline uint32_t CVRPropertyHelpers::GetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() void *pvBuffer, uint32_t unBufferSize, PropertyTypeTag_t *punTag, ETrackedPropertyError *pError ) { PropertyRead_t batch; @@ -3369,19 +3679,19 @@ inline uint64_t CVRPropertyHelpers::GetUint64Property( PropertyContainerHandle_t inline HmdVector2_t CVRPropertyHelpers::GetVec2Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) { - HmdVector2_t defaultval = { 0 }; + HmdVector2_t defaultval = { { 0, 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 }; + HmdVector3_t defaultval = { { 0, 0, 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 }; + HmdVector4_t defaultval = { { 0, 0, 0, 0 } }; return GetPropertyHelper( ulContainerHandle, prop, pError, defaultval, k_unHmdVector4PropertyTag ); } @@ -3515,10 +3825,6 @@ inline bool CVRPropertyHelpers::IsPropertySet( PropertyContainerHandle_t ulConta namespace vr { - - typedef uint64_t VRInputComponentHandle_t; - static const VRInputComponentHandle_t k_ulInvalidInputComponentHandle = 0; - enum EVRScalarType { VRScalarType_Absolute = 0, @@ -3557,9 +3863,20 @@ namespace vr /** Updates a skeleton component. */ virtual EVRInputError UpdateSkeletonComponent( VRInputComponentHandle_t ulComponent, EVRSkeletalMotionRange eMotionRange, const VRBoneTransform_t *pTransforms, uint32_t unTransformCount ) = 0; + /** Creates a pose component */ + virtual EVRInputError CreatePoseComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0; + + /** Updates a pose component. */ + virtual EVRInputError UpdatePoseComponent( VRInputComponentHandle_t ulComponent, const HmdMatrix34_t *pMatPoseOffset, double fTimeOffset ) = 0; + + /** Creates an eye tracking component **/ + virtual EVRInputError CreateEyeTrackingComponent( PropertyContainerHandle_t ulContainer, const char *pchName, VRInputComponentHandle_t *pHandle ) = 0; + + /** Updates an eye tracking component. */ + virtual EVRInputError UpdateEyeTrackingComponent( VRInputComponentHandle_t ulComponent, const VREyeTrackingData_t *pEyeTrackingData, double fTimeOffset ) = 0; }; - static const char * const IVRDriverInput_Version = "IVRDriverInput_003"; + static const char * const IVRDriverInput_Version = "IVRDriverInput_004"; } // namespace vr @@ -3854,7 +4171,7 @@ static const uint64_t k_ulInvalidIOBufferHandle = 0; virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0; }; - static const char *IVRIOBuffer_Version = "IVRIOBuffer_002"; + static const char * const IVRIOBuffer_Version = "IVRIOBuffer_002"; } // ivrdrivermanager.h @@ -3974,6 +4291,83 @@ namespace vr } // namespace vr +// ivripcresourcemanagerclient.h + +namespace vr +{ + +// ----------------------------------------------------------------------------- +// Purpose: Interact with the IPCResourceManager +// ----------------------------------------------------------------------------- +class IVRIPCResourceManagerClient +{ +public: + /** Create a new tracked Vulkan Image + * + * nImageFormat: in VkFormat + */ + virtual bool NewSharedVulkanImage( uint32_t nImageFormat, uint32_t nWidth, uint32_t nHeight, bool bRenderable, bool bMappable, bool bComputeAccess, uint32_t unMipLevels, uint32_t unArrayLayerCount, uint32_t unAdditionalVkCreateFlags, uint32_t unAdditionalVkUsageFlags, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Create a new tracked Vulkan Buffer */ + virtual bool NewSharedVulkanBuffer( uint32_t nSize, uint32_t nUsageFlags, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Create a new tracked Vulkan Semaphore */ + virtual bool NewSharedVulkanSemaphore( bool bCounting, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Grab a reference to hSharedHandle, and optionally generate a new IPC handle if pNewIpcHandle is not nullptr */ + virtual bool RefResource( vr::SharedTextureHandle_t hSharedHandle, uint64_t *pNewIpcHandle ) = 0; + + /** Drop a reference to hSharedHandle */ + virtual bool UnrefResource( vr::SharedTextureHandle_t hSharedHandle ) = 0; + + /* Get all the DRM formats we support using DMA-BUF images for. + * + * pOutFormatCount and pOutFormats function like Vulkan: + * - If pOutFormats is NULL, then pOutFormatCount will be overwritten with the format count. + * - If pOutFormats is not NULL, then pOutFormatCount specifies the size of the pOutFormats array, + * and will be overwritten with the number of formats written to the array. + * + * If the function fails, false is returned, and pOutFormatCount will be 0. + * Supported on Linux only. + */ + virtual bool GetDmabufFormats( uint32_t *pOutFormatCount, uint32_t *pOutFormats ) = 0; + + /** Get dmabuf modifiers we are allowed to use. + * + * pOutModifierCount and pOutModifiers function like Vulkan: + * - If pOutModifiers is NULL, then pOutModifierCount will be overwritten with the modifier count. + * - If pOutModifiers is not NULL, then pOutModifierCount specifies the size of the pOutModifiers array, + * and will be overwritten with the number of modifiers written to the array. + * + * If modifiers are not supported, a single DRM_FORMAT_MOD_INVALID entry will be returned. + * + * If the function fails, false is returned, and pOutModifierCount will be 0. + * Supported on Linux only. + */ + virtual bool GetDmabufModifiers( vr::EVRApplicationType eApplicationType, uint32_t unDRMFormat, uint32_t *pOutModifierCount, uint64_t *pOutModifiers ) = 0; + + /** Import a dmabuf directly. + * Note: the FD you pass in will be dup'ed, so you must close it yourself. + * This function does NOT take ownership of the fd you pass in. + * Supported on Linux only. + */ + virtual bool ImportDmabuf( vr::EVRApplicationType eApplicationType, vr::DmabufAttributes_t *pDmabufAttributes, vr::SharedTextureHandle_t *pSharedHandle ) = 0; + + /** Consumes an IPC handle (eg. from RefResource) and returns a file-descriptor. + * Caller acquires ownership of fd and is responsible for closing it. + * Supported on Linux only. + */ + virtual bool ReceiveSharedFd( uint64_t ulIpcHandle, int *pOutFd ) = 0; + +protected: + /** Non-deletable */ + virtual ~IVRIPCResourceManagerClient() {}; +}; + +static const char *IVRIPCResourceManagerClient_Version = "IVRIPCResourceManagerClient_003"; + +} + namespace vr @@ -3992,6 +4386,7 @@ namespace vr IVRDriverManager_Version, IVRResources_Version, IVRCompositorPluginProvider_Version, + IVRIPCResourceManagerClient_Version, nullptr }; @@ -4140,6 +4535,16 @@ namespace vr return m_pVRDriverSpatialAnchors; } + IVRIPCResourceManagerClient *VRIPCResourceManager() + { + if ( m_pVRIPCResourceManager == nullptr ) + { + EVRInitError eError; + m_pVRIPCResourceManager = ( IVRIPCResourceManagerClient * )VRDriverContext()->GetGenericInterface( IVRIPCResourceManagerClient_Version, &eError ); + } + return m_pVRIPCResourceManager; + } + private: CVRPropertyHelpers m_propertyHelpers; CVRHiddenAreaHelpers m_hiddenAreaHelpers; @@ -4155,6 +4560,7 @@ namespace vr IVRDriverInput *m_pVRDriverInput; IVRIOBuffer *m_pVRIOBuffer; IVRDriverSpatialAnchors *m_pVRDriverSpatialAnchors; + IVRIPCResourceManagerClient *m_pVRIPCResourceManager; }; inline COpenVRDriverContext &OpenVRInternal_ModuleServerDriverContext() @@ -4177,6 +4583,7 @@ namespace vr inline IVRDriverInput *VR_CALLTYPE VRDriverInput() { return OpenVRInternal_ModuleServerDriverContext().VRDriverInput(); } inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleServerDriverContext().VRIOBuffer(); } inline IVRDriverSpatialAnchors *VR_CALLTYPE VRDriverSpatialAnchors() { return OpenVRInternal_ModuleServerDriverContext().VRDriverSpatialAnchors(); } + inline IVRIPCResourceManagerClient *VR_CALLTYPE VRIPCResourceManager() { return OpenVRInternal_ModuleServerDriverContext().VRIPCResourceManager(); } inline void COpenVRDriverContext::Clear() { @@ -4191,11 +4598,13 @@ namespace vr m_pVRDriverInput = nullptr; m_pVRIOBuffer = nullptr; m_pVRDriverSpatialAnchors = nullptr; + m_pVRIPCResourceManager = nullptr; } inline EVRInitError COpenVRDriverContext::InitServer() { Clear(); + // VRIPCResourceManager initialized async. if ( !VRServerDriverHost() || !VRSettings() || !VRProperties() diff --git a/third-party/openvr/lib/linuxarm64/libopenvr_api_unity.so b/third-party/openvr/lib/linuxarm64/libopenvr_api_unity.so index a255d2b1..b924fdee 100644 Binary files a/third-party/openvr/lib/linuxarm64/libopenvr_api_unity.so and b/third-party/openvr/lib/linuxarm64/libopenvr_api_unity.so differ diff --git a/third-party/openvr/lib/win32/openvr_api.lib b/third-party/openvr/lib/win32/openvr_api.lib index 3a9a3c3a..00f2a00f 100644 Binary files a/third-party/openvr/lib/win32/openvr_api.lib and b/third-party/openvr/lib/win32/openvr_api.lib differ diff --git a/third-party/openvr/lib/win64/openvr_api.lib b/third-party/openvr/lib/win64/openvr_api.lib index e4cc9b92..76523ace 100644 Binary files a/third-party/openvr/lib/win64/openvr_api.lib and b/third-party/openvr/lib/win64/openvr_api.lib differ diff --git a/ver/versioncheck.json b/ver/versioncheck.json index 1abd405c..79244ec7 100644 --- a/ver/versioncheck.json +++ b/ver/versioncheck.json @@ -1 +1 @@ -{ "major": 5, "minor": 8, "patch": 11, "updateMessage": "", "optionalMessage": "" } +{ "major": 5, "minor": 8, "patch": 17, "updateMessage": "", "optionalMessage": "" }