vkQueueWaitIdle has a bug in current version of layers. You might want to try replace by appropriate
VkFences if it helps.
Awesome! Thank you!
I currently have with the same code a recurrig VUI-vkResetCommandBuffer-commandBuffer-00045 validation error message. Might this be related?
Yep, it’s issue KhronosGroup/Vulkan-ValidationLayers#2756. Only problem with the command buffer resets\destroys false positives are reported, but I can imagine it can mess up layout tracking too…
PS: though from your dump it seems you do submit the command buffer before you record it:
6,vkQueueSubmit(.pCommandBuffers = '0x0000558289784f50') 7,// Primary command buffer 3 commands 8,vkBeginCommandBuffer(commandBuffer = '0x0000558289784f50')
I cannot rule out that Nsight lays out the commands in the buffer once they are submitted to vkQueueSubmit and not immediately when they are recorded.
However, there was indeed a superfluous transition that should only be applied for regular textures not attachment textures and which caused the unexpected layout errors.
Now only the command buffer in use error remains…
Ok, apparently the fence only secured the queue submit for the current frame and not the command buffer meant for that frame.
Thanks everyone, I made a big step forward today!