lib_global2.hlsl 502 B

123456789101112131415161718
  1. // Check redefine global and resource with lib_global3.hlsl, lib_global4.hlsl.
  2. float2x2 RotateMat(float2x2 m, uint x, uint y);
  3. float2x2 MatRotate(float2x2 m, uint x, uint y);
  4. RWStructuredBuffer<float2x2> fA;
  5. [numthreads(8,8,1)]
  6. void entry( uint2 tid : SV_DispatchThreadID, uint2 gid : SV_GroupID, uint2 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex )
  7. {
  8. float2x2 f2x2 = fA[tid.x];
  9. f2x2 = RotateMat(f2x2, tid.x, tid.y);
  10. f2x2 = MatRotate(f2x2, tid.x, tid.y);
  11. fA[tid.y] = f2x2;
  12. }