Skip to content

Commit 919bcbb

Browse files
committed
Removed acuire next image fence wait, not effective anymore
1 parent 508f79e commit 919bcbb

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed

dlls/winex11.drv/vulkan.c

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -403,45 +403,7 @@ static VkResult X11DRV_vkAcquireNextImageKHR(VkDevice device,
403403
VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore,
404404
VkFence fence, uint32_t *image_index)
405405
{
406-
struct wine_vk_surface *surface = NULL;
407-
VkResult result;
408-
VkFence orig_fence;
409-
BOOL wait_fence = FALSE;
410-
HDC hdc = 0;
411-
412-
EnterCriticalSection(&context_section);
413-
if (!XFindContext(gdi_display, (XID)swapchain, vulkan_swapchain_context, (char **)&surface))
414-
{
415-
wine_vk_surface_grab(surface);
416-
hdc = surface->hdc;
417-
}
418-
LeaveCriticalSection(&context_section);
419-
420-
if (!surface || !surface->offscreen)
421-
wait_fence = FALSE;
422-
else if (surface->present_mode == VK_PRESENT_MODE_MAILBOX_KHR ||
423-
surface->present_mode == VK_PRESENT_MODE_FIFO_KHR)
424-
wait_fence = TRUE;
425-
426-
orig_fence = fence;
427-
if (wait_fence && !fence)
428-
{
429-
VkFenceCreateInfo create_info;
430-
create_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
431-
create_info.pNext = NULL;
432-
create_info.flags = 0;
433-
pvkCreateFence(device, &create_info, NULL, &fence);
434-
}
435-
436-
result = pvkAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, image_index);
437-
if ((result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR) && hdc && surface && surface->offscreen)
438-
{
439-
if (wait_fence) pvkWaitForFences(device, 1, &fence, 0, timeout);
440-
}
441-
442-
if (fence != orig_fence) pvkDestroyFence(device, fence, NULL);
443-
if (surface) wine_vk_surface_release(surface);
444-
return result;
406+
return pvkAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, image_index);
445407
}
446408

447409
static VkResult X11DRV_vkAcquireNextImage2KHR(VkDevice device,

0 commit comments

Comments
 (0)