DebugGSParameters.hlsl 826 B

123456789101112131415161718192021222324
  1. // RUN: %dxc -Emain -Tgs_6_0 %s | %opt -S -hlsl-dxil-debug-instrumentation,parameter0=1,parameter1=2 | %FileCheck %s
  2. // Check that the instance/primid detection was emitted:
  3. // CHECK: [[PrimId:[^ ]+]] = call i32 @dx.op.primitiveID.i32(i32 108)
  4. // CHECK: [[CompareToPrimId:[^ ]+]] = icmp eq i32 [[PrimId]], 1
  5. // CHECK: [[GSInstanceId:[^ ]+]] = call i32 @dx.op.gsInstanceID.i32(i32 100)
  6. // CHECK: [[CompareToInstanceId:[^ ]+]] = icmp eq i32 [[GSInstanceId]], 2
  7. // CHECK: [[CompareBoth:[^ ]+]] = and i1 [[CompareToPrimId]], [[CompareToInstanceId]]
  8. struct MyStruct
  9. {
  10. float4 pos : SV_Position;
  11. float2 a : AAA;
  12. };
  13. [maxvertexcount(12)][instance(6)]
  14. void main(point float4 array[1] : COORD, inout PointStream<MyStruct> OutputStream0)
  15. {
  16. MyStruct a = (MyStruct)0;
  17. OutputStream0.Append(a);
  18. OutputStream0.RestartStrip();
  19. }