imgui icon indicating copy to clipboard operation
imgui copied to clipboard

Vulkan validation error with SDK 1.3.275

Open mklefrancois opened this issue 1 year ago • 9 comments

Version/Branch of Dear ImGui:

Version docking

Back-ends:

imgui_impl_vulkan

Compiler, OS:

Windows 11

Full config/build information:

No response

Details:

Running the example_glfw_vulkan will generate validation errors with the latest Vulkan SDK 1.3.275

[vulkan] Debug report from ObjectType: 5
Message: Validation Error: [ VUID-vkAcquireNextImageKHR-semaphore-01779 ] Object 0: handle = 0x967dd1000000000e, type = VK_OBJECT_TYPE_SEMAPHORE; | MessageID = 0x5717e75b | 
vkAcquireNextImageKHR():  Semaphore must not have any pending operations. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE it must not have any uncompleted signal or wait operations pending 
(https://vulkan.lunarg.com/doc/view/1.3.275.0/windows/1.3-extensions/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01779)

One way to fix this is to move vkWaitForFences before vkAcquireNextImageKHR. Doing this in imgui_impl_vulkan.cpp::ImGui_ImplVulkan_RenderWindow and main.cpp::FrameRender fix the errors.

Another solution would be to create SemaphoreCount = ImageCount+1 and to change wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount;

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

mklefrancois avatar Jan 18 '24 14:01 mklefrancois