The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/main: Guard VkQueue access when calling vkQueuePresentKHR

The VkQueue in vkQueuePresentKHR is externally synchronized, so we need
to take the queue_mutex when we call that function.

Found this with the [latest validation layers][1] and the OpenXR CTS test
Swapchains. This has probably been a longstanding bug in Monado as that
particular code is fairly old.

[1]: https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/6631

+5
+5
src/xrt/compositor/main/comp_target_swapchain.c
··· 884 884 .pImageIndices = &index, 885 885 }; 886 886 887 + 888 + // Need to take the queue lock for present. 889 + os_mutex_lock(&vk->queue_mutex); 887 890 VkResult ret = vk->vkQueuePresentKHR(queue, &presentInfo); 891 + os_mutex_unlock(&vk->queue_mutex); 892 + 888 893 889 894 #ifdef VK_EXT_display_control 890 895 if (cts->vblank.has_started) {