How can I safely alter a texture from multiple threads? (seems like there is no `InterlockedAdd`)

22 Views Asked by At

According to https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_Int64_and_Float_Atomics.html#interlockedadd, it seems to me that even with shader model 6.6 there is still no InterlockedAdd function for floats. I have a ray generation shader which adds to a RWTexture2D at a random pixel. How do I ensure that this add is safe when no InterlockedAdd is available? What can I do here?

0

There are 0 best solutions below