globallycoherent2.hlsl 434 B

1234567891011121314151617
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // CHECK: globallycoherent can only be used with Unordered Access View buffers
  3. globallycoherent RWTexture1D<float4> uav1 : register(u3);
  4. RWBuffer<float4> uav2;
  5. globallycoherent Buffer<float4> srv;
  6. float4 main(uint2 a : A, uint2 b : B) : SV_Target
  7. {
  8. globallycoherent RWTexture1D<float4> uav3 = uav1;
  9. float x = 3;
  10. uav3[0] = srv[0];
  11. uav1[0] = 2;
  12. uav2[1] = 3;
  13. return 0;
  14. }