semantic.render-target-array-index.gs.hlsl 873 B

12345678910111213141516171819202122232425262728293031323334
  1. // Run: %dxc -T gs_6_0 -E main
  2. // CHECK: OpCapability Geometry
  3. // CHECK: OpEntryPoint Geometry %main "main"
  4. // CHECK-SAME: %in_var_SV_RenderTargetArrayIndex
  5. // CHECK-SAME: %gl_Layer
  6. // CHECK: OpDecorate %gl_Layer BuiltIn Layer
  7. // CHECK: OpDecorate %in_var_SV_RenderTargetArrayIndex Location 0
  8. // CHECK: %in_var_SV_RenderTargetArrayIndex = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  9. // CHECK: %gl_Layer = OpVariable %_ptr_Output_uint Output
  10. // GS per-vertex input
  11. struct GsVIn {
  12. uint index : SV_RenderTargetArrayIndex;
  13. };
  14. // GS per-vertex output
  15. struct GsVOut {
  16. uint index : SV_RenderTargetArrayIndex;
  17. };
  18. [maxvertexcount(2)]
  19. void main(in line GsVIn inData[2],
  20. inout LineStream<GsVOut> outData) {
  21. GsVOut vertex;
  22. vertex = (GsVOut)0;
  23. outData.Append(vertex);
  24. outData.RestartStrip();
  25. }