GPUOpen-LibrariesAndSDKs / RadeonRays_SDK

Radeon Rays is ray intersection acceleration library for hardware and software multiplatforms using CPU and GPU
MIT License
1.07k stars 192 forks source link

Temporary upload buffers are bound as UAVs in DX12 scene build dispatches #228

Open NoahMercury opened 3 years ago

NoahMercury commented 3 years ago

The temporary buffers holding InstanceDescriptions are allocated off of the upload heap, and then bound as UAVs in the scene BVH build dispatches. This is illegal and is reported as such by GPU-based validation.

If these resources receive D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, the error is caught immediately by the debug layer, so that's not the fix. The correct fix is to allocate another non-upload buffer and copy the data to it from the upload buffer.

Repro steps:

  1. Take a PIX for Windows capture of the basic test.
  2. Open the capture, go to the "Warnings" pane.
  3. Click "run GPU-based validation". When the prompt comes up asking for running the analysis, click "Yes".
ghost commented 3 years ago
  1. Click "run GPU-based validation". When the prompt comes up asking for running the analysis, click "Yes".

And what it says there exactly?