diff --git a/vrclient_x64/gen_wrapper.py b/vrclient_x64/gen_wrapper.py index d8ca678a..400b1787 100755 --- a/vrclient_x64/gen_wrapper.py +++ b/vrclient_x64/gen_wrapper.py @@ -235,7 +235,7 @@ MANUAL_METHODS = { "IVRCompositor_Submit": lambda ver, abi: ver > 8, "IVRCompositor_SetSkyboxOverride": lambda ver, abi: ver > 8, "IVRCompositor_PostPresentHandoff": lambda ver, abi: abi == 'w', - "IVRCompositor_WaitGetPoses": lambda ver, abi: abi == 'w' and ver > 15 and ver < 27, + "IVRCompositor_WaitGetPoses": lambda ver, abi: abi == 'w' and ver > 15, "IVRCompositor_GetVulkanDeviceExtensionsRequired": lambda ver, abi: abi == 'u', "IVRRenderModels_LoadTextureD3D11_Async": lambda ver, abi: abi == 'w', "IVRRenderModels_FreeTextureD3D11": lambda ver, abi: abi == 'w', diff --git a/vrclient_x64/vrcompositor_manual.c b/vrclient_x64/vrcompositor_manual.c index d82452c2..acf71cbd 100644 --- a/vrclient_x64/vrcompositor_manual.c +++ b/vrclient_x64/vrcompositor_manual.c @@ -1295,6 +1295,41 @@ uint32_t __thiscall winIVRCompositor_IVRCompositor_026_SetSkyboxOverride( struct return params._ret; } +uint32_t __thiscall winIVRCompositor_IVRCompositor_027_WaitGetPoses( struct w_steam_iface *_this, + TrackedDevicePose_t *pRenderPoseArray, uint32_t unRenderPoseArrayCount, + TrackedDevicePose_t *pGamePoseArray, uint32_t unGamePoseArrayCount ) +{ + struct IVRCompositor_IVRCompositor_027_WaitGetPoses_params params = + { + .linux_side = _this->u_iface, + .pRenderPoseArray = pRenderPoseArray, + .unRenderPoseArrayCount = unRenderPoseArrayCount, + .pGamePoseArray = pGamePoseArray, + .unGamePoseArrayCount = unGamePoseArrayCount, + }; + TRACE( "%p\n", _this ); + wait_get_poses_init( _this->u_iface ); + + if (compositor_data.dxvk_device && compositor_data.d3d11_explicit_handoff && !compositor_data.handoff_called) + { + struct IVRCompositor_IVRCompositor_027_PostPresentHandoff_params params = {.linux_side = _this->u_iface}; + /* Calling handoff after submit is optional for d3d11 but mandatory for Vulkan + * if explicit timing mode is set. */ + VRCLIENT_CALL( IVRCompositor_IVRCompositor_027_PostPresentHandoff, ¶ms ); + } + + VRCLIENT_CALL( IVRCompositor_IVRCompositor_027_WaitGetPoses, ¶ms ); + + if (compositor_data.dxvk_device && compositor_data.d3d11_explicit_handoff) + { + struct IVRCompositor_IVRCompositor_027_SubmitExplicitTimingData_params params = {.linux_side = _this->u_iface}; + VRCLIENT_CALL( IVRCompositor_IVRCompositor_027_SubmitExplicitTimingData, ¶ms ); + } + + wait_get_poses_done( _this->u_iface ); + return params._ret; +} + uint32_t __thiscall winIVRCompositor_IVRCompositor_027_Submit( struct w_steam_iface *_this, uint32_t eEye, const w_Texture_t *pTexture, const VRTextureBounds_t *pBounds, uint32_t nSubmitFlags ) diff --git a/vrclient_x64/winIVRCompositor.c b/vrclient_x64/winIVRCompositor.c index 3608e7ca..222524d6 100644 --- a/vrclient_x64/winIVRCompositor.c +++ b/vrclient_x64/winIVRCompositor.c @@ -10097,20 +10097,7 @@ uint32_t __thiscall winIVRCompositor_IVRCompositor_027_GetTrackingSpace(struct w return params._ret; } -uint32_t __thiscall winIVRCompositor_IVRCompositor_027_WaitGetPoses(struct w_steam_iface *_this, TrackedDevicePose_t *pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t *pGamePoseArray, uint32_t unGamePoseArrayCount) -{ - struct IVRCompositor_IVRCompositor_027_WaitGetPoses_params params = - { - .linux_side = _this->u_iface, - .pRenderPoseArray = pRenderPoseArray, - .unRenderPoseArrayCount = unRenderPoseArrayCount, - .pGamePoseArray = pGamePoseArray, - .unGamePoseArrayCount = unGamePoseArrayCount, - }; - TRACE("%p\n", _this); - VRCLIENT_CALL( IVRCompositor_IVRCompositor_027_WaitGetPoses, ¶ms ); - return params._ret; -} +extern uint32_t __thiscall winIVRCompositor_IVRCompositor_027_WaitGetPoses(struct w_steam_iface *_this, TrackedDevicePose_t *pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t *pGamePoseArray, uint32_t unGamePoseArrayCount); uint32_t __thiscall winIVRCompositor_IVRCompositor_027_GetLastPoses(struct w_steam_iface *_this, TrackedDevicePose_t *pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t *pGamePoseArray, uint32_t unGamePoseArrayCount) {