uint64_2.hlsl 604 B

123456789101112131415161718192021222324
  1. // RUN: %dxilver 1.1 | %dxc -E main -T cs_6_0 -not_use_legacy_cbuf_load %s | FileCheck %s
  2. // CHECK: 64-Bit integer
  3. // CHECK: dx.op.bufferStore.i32
  4. // CHECK: dx.op.bufferStore.i32
  5. // CHECK: !{i32 0, i64 1048576
  6. // Note: a change in the internal layout will produce
  7. // a difference in the serialized flags, eg:
  8. //
  9. // 0n0532480 = 0b000010000010000000000000
  10. // 0n1056768 = 0b000100000010000000000000
  11. //
  12. // This becomes part of the DXIL spec once finalized.
  13. RWBuffer<uint64_t> buf;
  14. uint64_t ref;
  15. [numthreads(64,1,1)]
  16. void main(uint tid : SV_DispatchThreadID)
  17. {
  18. if (ref > buf[tid])
  19. buf[tid] = ref;
  20. }