semantic.render-target-array-index.hs.hlsl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Run: %dxc -T hs_6_0 -E main
  2. #define NumOutPoints 2
  3. // CHECK: OpEntryPoint TessellationControl %main "main"
  4. // CHECK-SAME: %in_var_SV_RenderTargetArrayIndex
  5. // CHECK-SAME: %out_var_SV_RenderTargetArrayIndex
  6. // CHECK-SAME: %out_var_SV_RenderTargetArrayIndex_0
  7. // CHECK: OpDecorate %in_var_SV_RenderTargetArrayIndex Location 0
  8. // CHECK: OpDecorate %out_var_SV_RenderTargetArrayIndex Location 0
  9. // CHECK: OpDecorate %out_var_SV_RenderTargetArrayIndex_0 Location 1
  10. // CHECK: %in_var_SV_RenderTargetArrayIndex = OpVariable %_ptr_Input__arr_uint_uint_2 Input
  11. // CHECK: %out_var_SV_RenderTargetArrayIndex = OpVariable %_ptr_Output__arr_uint_uint_2 Output
  12. // CHECK: %out_var_SV_RenderTargetArrayIndex_0 = OpVariable %_ptr_Output_uint Output
  13. struct HsCpIn {
  14. uint index : SV_RenderTargetArrayIndex;
  15. };
  16. struct HsCpOut {
  17. uint index : SV_RenderTargetArrayIndex;
  18. };
  19. struct HsPcfOut {
  20. float tessOuter[4] : SV_TessFactor;
  21. float tessInner[2] : SV_InsideTessFactor;
  22. uint index : SV_RenderTargetArrayIndex;
  23. };
  24. // Patch Constant Function
  25. HsPcfOut pcf() {
  26. HsPcfOut output;
  27. output = (HsPcfOut)0;
  28. return output;
  29. }
  30. [domain("quad")]
  31. [partitioning("fractional_odd")]
  32. [outputtopology("triangle_ccw")]
  33. [outputcontrolpoints(NumOutPoints)]
  34. [patchconstantfunc("pcf")]
  35. HsCpOut main(InputPatch<HsCpIn, NumOutPoints> patch,
  36. uint id : SV_OutputControlPointID) {
  37. HsCpOut output;
  38. output = (HsCpOut)0;
  39. return output;
  40. }