Missing synchronization validation for ray tracing acceleration updates & uses #9076
Description
When the top level acceleration structure is updated using vkCmdBuildAccelerationStructuresKHR
, my expectation is that there are barriers required to ensure valid use; at the minimum, a barrier between vkCmdBuildAccelerationStructuresKHR
(VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR / VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR) and a subsequent use of TLAS in the shader (e.g. VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT / VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR).
However, without this barrier with synchronization validation enabled, no read-after-write hazards are reported.
In this case, the acceleration structure is bound to the shader via vkCmdPushDescriptorSetWithTemplateKHR & VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR descriptor type, so in theory this should be similar to any other write to a resource that is followed by a read.