hlsl.promote.atomic.frag 433 B

123456789101112131415161718
  1. RWBuffer<uint> s_uintbuff; // UINT RWBuffer ...
  2. float4 main() : SV_Target
  3. {
  4. int Loc; // ... with INT variables
  5. int Inc;
  6. int Orig;
  7. // This must select the uint flavor of SPIR-V atomic op, and promote
  8. // the other arguments as required. The output value from the
  9. // imageAtomicAdd AST will be converted to an int for 'Orig'.
  10. InterlockedAdd(s_uintbuff[Loc], Inc, Orig);
  11. return float4(0,0,0,0);
  12. }