semantic.instance-id.gs.hlsl 806 B

123456789101112131415161718192021222324252627282930313233
  1. // Run: %dxc -T gs_6_0 -E main
  2. // CHECK: OpEntryPoint Geometry %main "main"
  3. // CHECK-SAME: %in_var_SV_InstanceID
  4. // CHECK-SAME: %out_var_SV_InstanceID
  5. // CHECK: OpDecorate %in_var_SV_InstanceID Location 0
  6. // CHECK: OpDecorate %out_var_SV_InstanceID Location 0
  7. // CHECK: %in_var_SV_InstanceID = OpVariable %_ptr_Input__arr_int_uint_2 Input
  8. // CHECK: %out_var_SV_InstanceID = OpVariable %_ptr_Output_int Output
  9. // GS per-vertex input
  10. struct GsVIn {
  11. int id : SV_InstanceID;
  12. };
  13. // GS per-vertex output
  14. struct GsVOut {
  15. int id : SV_InstanceID;
  16. };
  17. [maxvertexcount(2)]
  18. void main(in line GsVIn inData[2],
  19. inout LineStream<GsVOut> outData) {
  20. GsVOut vertex;
  21. vertex = (GsVOut)0;
  22. outData.Append(vertex);
  23. outData.RestartStrip();
  24. }