selectObj.hlsl 555 B

12345678910111213141516171819202122232425262728
  1. // RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
  2. // CHECK: local resource not guaranteed to map to unique global resource
  3. RWStructuredBuffer<float2x2> oA;
  4. RWStructuredBuffer<float2x2> oB;
  5. StructuredBuffer<float2x2> iA;
  6. StructuredBuffer<float2x2> iB;
  7. uint s;
  8. [numthreads(8,8,1)]
  9. void main( uint2 tid : SV_DispatchThreadID, uint2 gid : SV_GroupID, uint2 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex )
  10. {
  11. RWStructuredBuffer<float2x2> o = oA;
  12. StructuredBuffer<float2x2> i = iA;
  13. if (s > 8) {
  14. o = oB;
  15. i = iB;
  16. }
  17. o[gid.x] = i[gid.x];
  18. }