I'm thinking about an occlusion system, and I'm wondering about the writing behavior to UAV's from a pixel shader.
I want to pass an integer ID to a pixel shader, before using that as an index to write a value into a UAV. I only care that a value has been written to it, and not what the value is (as long as it's non-zero).
I'm unsure about the threading implications. Assuming every value in the UAV is defaulted to 0, if a ton of different pixel shaders are setting a non-zero value to a position in the UAV what will happen?
Will it be set to the value, or will the writes interfere with each-other in some undefined way? Is the writing behavior guaranteed to be consistent among different DX11 capable GPU's?
Edit: Or are they all auto-atomic'd.