selectObj2.hlsl 534 B

1234567891011121314151617181920212223
  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 = s>7? oA: oB;
  12. StructuredBuffer<float2x2> i = s>7? iA : iB;
  13. o[gid.x] = i[gid.x];
  14. }