Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualDementedCarrot

Posted 30 August 2013 - 04:25 PM

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.


#1DementedCarrot

Posted 30 August 2013 - 03:57 PM

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?


PARTNERS