semantic.render-target-array-index.ds.hlsl 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Run: %dxc -T ds_6_0 -E main
  2. // HS PCF output
  3. struct HsPcfOut {
  4. float outTessFactor[4] : SV_TessFactor;
  5. float inTessFactor[2] : SV_InsideTessFactor;
  6. uint index : SV_RenderTargetArrayIndex;
  7. };
  8. // Per-vertex input structs
  9. struct DsCpIn {
  10. uint index : SV_RenderTargetArrayIndex;
  11. };
  12. // Per-vertex output structs
  13. struct DsCpOut {
  14. uint index : SV_RenderTargetArrayIndex;
  15. };
  16. // CHECK: OpCapability ShaderViewportIndexLayerEXT
  17. // CHECK: OpExtension "SPV_EXT_shader_viewport_index_layer"
  18. // CHECK: OpEntryPoint TessellationEvaluation %main "main"
  19. // CHECK-SAME: %in_var_SV_RenderTargetArrayIndex
  20. // CHECK-SAME: %in_var_SV_RenderTargetArrayIndex_0
  21. // CHECK-SAME: %gl_Layer
  22. // CHECK: OpDecorate %gl_Layer BuiltIn Layer
  23. // CHECK: OpDecorate %in_var_SV_RenderTargetArrayIndex Location 0
  24. // CHECK: OpDecorate %in_var_SV_RenderTargetArrayIndex_0 Location 1
  25. // CHECK: %in_var_SV_RenderTargetArrayIndex = OpVariable %_ptr_Input__arr_uint_uint_3 Input
  26. // CHECK: %in_var_SV_RenderTargetArrayIndex_0 = OpVariable %_ptr_Input_uint Input
  27. // CHECK: %gl_Layer = OpVariable %_ptr_Output_uint Output
  28. [domain("quad")]
  29. DsCpOut main(OutputPatch<DsCpIn, 3> patch, HsPcfOut pcfData) {
  30. DsCpOut dsOut;
  31. dsOut = (DsCpOut)0;
  32. return dsOut;
  33. }