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

123456789101112131415161718192021222324252627282930313233343536373839
  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: OpEntryPoint TessellationEvaluation %main "main"
  17. // CHECK-SAME: %in_var_SV_RenderTargetArrayIndex
  18. // CHECK-SAME: %in_var_SV_RenderTargetArrayIndex_0
  19. // CHECK-SAME: %out_var_SV_RenderTargetArrayIndex
  20. // CHECK: OpDecorate %in_var_SV_RenderTargetArrayIndex Location 0
  21. // CHECK: OpDecorate %in_var_SV_RenderTargetArrayIndex_0 Location 1
  22. // CHECK: OpDecorate %out_var_SV_RenderTargetArrayIndex Location 0
  23. // CHECK: %in_var_SV_RenderTargetArrayIndex = OpVariable %_ptr_Input__arr_uint_uint_3 Input
  24. // CHECK: %in_var_SV_RenderTargetArrayIndex_0 = OpVariable %_ptr_Input_uint Input
  25. // CHECK: %out_var_SV_RenderTargetArrayIndex = OpVariable %_ptr_Output_uint Output
  26. [domain("quad")]
  27. DsCpOut main(OutputPatch<DsCpIn, 3> patch, HsPcfOut pcfData) {
  28. DsCpOut dsOut;
  29. dsOut = (DsCpOut)0;
  30. return dsOut;
  31. }