1 year ago

#374655

test-img

Saelhenen

Vulkan: SYNC-HAZARD-READ_AFTER_WRITE despite wait semaphores

In my Vulkan application, I use "VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT" and I've got this error: "

Validation Error: [ SYNC-HAZARD-READ_AFTER_WRITE ] Object 0: handle = 0xda06f70000000a0d, name = [RENDER_PASS] bloom - up sample 2, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x4cb75b2d | vkCmdBeginRenderPass: Hazard READ_AFTER_WRITE vs. layout transition in subpass 0 for attachment 0 aspect color during load with loadOp"

This error occurs at vkCmdBeginRenderPass execution and I understand that my render pass will try to read a framebuffer/image which is maybe not yet fully written by a previous render pass. Right ?

However, I don't understand why the validation layer detect a synchronization problem already at "vkCmdBeginRenderPass" execution. Indeed, in my application I ensure that previous render pass is completed thanks to a wait semaphore I provide in vkQueueSubmit (VkSubmitInfo.pWaitSemaphores). Of course, this vkQueueSubmit is executed after the vkCmdBeginRenderPass execution.

So, why the validation layer returns a synchronization error instead of wait the vkQueueSubmit execution to see if a wait semaphore exists ?

graphics

rendering

vulkan

0 Answers

Your Answer

Accepted video resources