KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
778 stars 407 forks source link

vkCmdBuildAccelerationStructuresKHR sync validation missing? #7372

Open danginsburg opened 10 months ago

danginsburg commented 10 months ago

Describe the situation in which you encountered the missing validation Issue description: I just spent a bunch of time hunting down a GPU hang on NVIDIA in vkCmdBuildAccelerationStructuresKHR. NVIDIA Aftermath was reporting an MMU NACK Error in the "Internal - AS Build or Refit". I was able to narrow it down through trial and error, and eventually I believe I have figured out that the vkCmdPipelineBarriers following the vkCmdCopyBuffers to vertex/index buffers prior to doing the BLAS build were not being put into the command buffer (this was my bug, I wasn't issuing the pipeline barriers because I was missing some internal code to flush the queued up barriers). What surprised me is that I would have thought sync validation would complain about having a RAW hazard since the acceleration structure build is reading the buffers before the copies complete. However, I did not get any sync val messages (I confirmed I was running with sync validation).

Assuming I'm correct here and that this sync validation doesn't exist, the request would be to add proper sync val support to vkCmdBuildAccelerationStructuresKHR and other related Raytracing APIs. I also tried GPU AV and it did not find any errors in this case.

spencer-lunarg commented 10 months ago

We have just started add all the CPU core check validation for RTX (with plans to add GPU-AV support right after)

As for sync val, I can quick see that vkCmdBuildAccelerationStructuresKHR (and also vkCmdBuildAccelerationStructuresIndirectKHR) have hooks into Sync Val... so yes, we should get some RTX Sync Val going!