lib_cs_entry.hlsl 860 B

12345678910111213141516171819202122232425262728293031323334
  1. // RUN: %dxc -T lib_6_3 -auto-binding-space 11 %s | FileCheck %s
  2. // Make sure entry function exist.
  3. // CHECK: @entry(
  4. // Make sure function decl exist.
  5. // CHECK: LoadInputMat
  6. // CHECK: RotateMat
  7. // CHECK: StoreOutputMat
  8. // Make sure function props exist.
  9. // CHECK: !dx.entryPoints = !{{{.*}}, {{.*}}}
  10. // Make sure function props is correct for [numthreads(8,8,1)].
  11. // CHECK: @entry,
  12. // CHECK: !{i32 8, i32 8, i32 1}
  13. cbuffer A {
  14. float a;
  15. }
  16. void StoreOutputMat(float2x2 m, uint gidx);
  17. float2x2 LoadInputMat(uint x, uint y);
  18. float2x2 RotateMat(float2x2 m, uint x, uint y);
  19. [numthreads(8,8,1)]
  20. void entry( uint2 tid : SV_DispatchThreadID, uint2 gid : SV_GroupID, uint2 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex )
  21. {
  22. float2x2 f2x2 = LoadInputMat(gid.x, gid.y);
  23. f2x2 = RotateMat(f2x2, tid.x, tid.y) + a;
  24. StoreOutputMat(f2x2, gidx);
  25. }