I originally encountered this problem due to actual symptoms of incorrect synchronization in a more realistic program than the hello triangle example, but when downloading the hello triangle app I am able to show synchronization errors due to the synchronization validation failing.
I added this code to the 15_hello_triangle.cpp file:
validation layer: Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0xd000000000d, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x5c0ec5d6 | vkCmdBeginRenderPass: Hazard WRITE_AFTER_WRITE vs. layout transition in subpass 0 for attachment 0 aspect color during load with loadOp VK_ATTACHMENT_LOAD_OP_CLEAR.
validation layer: Validation Error: [ SYNC-HAZARD-WRITE-AFTER-WRITE ] Object 0: handle = 0xd000000000d, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x5c0ec5d6 | vkCmdEndRenderPass: Hazard WRITE_AFTER_WRITE vs. store/resolve operations in subpass 0 for attachment 0 final image layout transition (old_layout: VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, new_layout: VK_IMAGE_LAYOUT_PRESENT_SRC_KHR).
Actual issues occur on Nvidia + Wayland when you make the GPU very busy:
flickering.webm
There seems to be something wrong with the synchronization in the tutorial that propagated into my program, but I don't understand synchronization well enough to say what. Also, it may be a good idea to enable synchronization and other extended validation in the tutorial, or at least show users how. I had no idea that this feature existed until recently.
I originally encountered this problem due to actual symptoms of incorrect synchronization in a more realistic program than the hello triangle example, but when downloading the hello triangle app I am able to show synchronization errors due to the synchronization validation failing.
I added this code to the 15_hello_triangle.cpp file:
Then, when running, there are validation errors:
Actual issues occur on Nvidia + Wayland when you make the GPU very busy: flickering.webm
There seems to be something wrong with the synchronization in the tutorial that propagated into my program, but I don't understand synchronization well enough to say what. Also, it may be a good idea to enable synchronization and other extended validation in the tutorial, or at least show users how. I had no idea that this feature existed until recently.