wineopenxr: Lock d3d11 device in xrAcquireSwapchainImage().

CW-Bug-Id: #23491
This commit is contained in:
Paul Gofman 2024-05-01 15:47:03 -06:00 committed by Arkadiusz Hiler
parent cce9c8b308
commit 231c4b7112
4 changed files with 17 additions and 9 deletions

View File

@ -176,6 +176,7 @@ FUNCTION_OVERRIDES = {
"xrDestroySwapchain" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrEndFrame" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrBeginFrame" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrAcquireSwapchainImage" : {"dispatch" : True, "driver" : True, "thunk" : False},
}
NOT_OUR_FUNCTIONS = [

View File

@ -1894,6 +1894,21 @@ XrResult WINAPI wine_xrBeginFrame(XrSession session, const XrFrameBeginInfo *fra
return ret;
}
XrResult WINAPI wine_xrAcquireSwapchainImage(XrSwapchain swapchain, const XrSwapchainImageAcquireInfo *acquireInfo, uint32_t *index)
{
wine_XrSession *wine_session = ((wine_XrSwapchain *)swapchain)->wine_session;
IDXGIVkInteropDevice2 *dxvk_device;
XrResult ret;
WINE_TRACE("%p, %p, %p\n", swapchain, acquireInfo, index);
if ((dxvk_device = wine_session->wine_instance->dxvk_device))
dxvk_device->lpVtbl->LockSubmissionQueue(dxvk_device);
ret = xrAcquireSwapchainImage(((wine_XrSwapchain *)swapchain)->swapchain, acquireInfo, index);
if (dxvk_device)
dxvk_device->lpVtbl->ReleaseSubmissionQueue(dxvk_device);
return ret;
}
/* wineopenxr API */
XrResult WINAPI __wineopenxr_GetVulkanInstanceExtensions(uint32_t buflen, uint32_t *outlen, char *buf)
{

View File

@ -162,15 +162,6 @@ static XrResult WINAPI wine_xrAcquireEnvironmentDepthImageMETA(XrEnvironmentDept
return ret;
}
XrResult WINAPI wine_xrAcquireSwapchainImage(XrSwapchain swapchain, const XrSwapchainImageAcquireInfo *acquireInfo, uint32_t *index)
{
XrResult ret;
WINE_TRACE("%p, %p, %p\n", swapchain, acquireInfo, index);
ret = xrAcquireSwapchainImage(((wine_XrSwapchain *)swapchain)->swapchain, acquireInfo, index);
return ret;
}
static XrResult WINAPI wine_xrApplyForceFeedbackCurlMNDX(XrHandTrackerEXT handTracker, const XrForceFeedbackCurlApplyLocationsMNDX *locations)
{
XrResult ret;

View File

@ -25,6 +25,7 @@
#define WINE_XR_VERSION XR_API_VERSION_1_1
/* Functions for which we have custom implementations outside of the thunks. */
XrResult WINAPI wine_xrAcquireSwapchainImage(XrSwapchain swapchain, const XrSwapchainImageAcquireInfo *acquireInfo, uint32_t *index);
XrResult WINAPI wine_xrBeginFrame(XrSession session, const XrFrameBeginInfo *frameBeginInfo);
XrResult WINAPI wine_xrConvertTimeToWin32PerformanceCounterKHR(XrInstance instance, XrTime time, LARGE_INTEGER *performanceCounter);
XrResult WINAPI wine_xrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, const LARGE_INTEGER *performanceCounter, XrTime *time);