On Mon Mar 11 13:57:16 2024 +0000, Henri Verbeet wrote:
Subject: [PATCH 5/5] tests: Clear the UAV before testing. There is no guarantee that a resource is cleared upon creation. This fixes the test on NVIDIA and llvmpipe.
Does this need an UAV barrier between the clear and the dispatch?
Good point. I couldn't find any definitive answer, but from https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_res... it seems that barriers must always used between pairs of write operations (even if the second operation doesn't read, or at least doesn't apparently read; the page rather gives the negative version of this: you're allowed to skip the barrier between two read-only operations). I couldn't find any formal definition of what is a "write operation", so it's not clear whether a clear operation is a write operation. For the avoidance of doubt I'll pretend it is a fix the MR.