Im not sure I’ve ever seen InterlockedAdd (hlsl) work correctly on Nvidia. Works on AMD tho. Can’t help but wonder if I’m doing something wrong, and AMD is more permissive. Seen a few reports of other people noticing the same thing.
I'm willing to accept a memory barrier is missing. Every time I feel like I understand barriers, they always seem to have another hand to reveal. SomeBuffer is used in another compute shader immediately following this one.
-
-
It'd be unusual to need a memory barrier if you're using atomics on UAVs. But if you're trying to read straight back out of someBuffer that could be iffy. Are you sure you didn't want to use the 3 operand version of InterlockedAdd with the 'old' return value?
-
I use the 3 operand version (and store the result in another buffer). Twitter just didn't give me enough space to write it all out.
- Näytä vastaukset
Uusi keskustelu -
-
-
Okay, but no other accesses to that buffer in the first shader? Then on D3D11, you need to do nothing else. On D3D12, you need a UAV barrier on that buffer between the two dispatches.
-
Interesting. I've seen the problem (it manifests as flickering in the final result) on d3d11. We run Vulkan, D3D12, and D3D11 with an abstraction layer in between, so I'll be digging for a missing barrier. FWIW, problem goes away on Nvidia if I set numthreads(1,1,1).
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.