semantic.instance-id.hs.hlsl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_InstanceID
  5. // CHECK-SAME: %out_var_SV_InstanceID
  6. // CHECK: OpDecorate %in_var_SV_InstanceID Location 0
  7. // CHECK: OpDecorate %out_var_SV_InstanceID Location 0
  8. // CHECK: %in_var_SV_InstanceID = OpVariable %_ptr_Input__arr_int_uint_2 Input
  9. // CHECK: %out_var_SV_InstanceID = OpVariable %_ptr_Output__arr_int_uint_2 Output
  10. struct HsCpIn {
  11. int id : SV_InstanceID;
  12. };
  13. struct HsCpOut {
  14. int id : SV_InstanceID;
  15. };
  16. struct HsPcfOut {
  17. float tessOuter[4] : SV_TessFactor;
  18. float tessInner[2] : SV_InsideTessFactor;
  19. };
  20. // Patch Constant Function
  21. HsPcfOut pcf() {
  22. HsPcfOut output;
  23. output = (HsPcfOut)0;
  24. return output;
  25. }
  26. [domain("quad")]
  27. [partitioning("fractional_odd")]
  28. [outputtopology("triangle_ccw")]
  29. [outputcontrolpoints(NumOutPoints)]
  30. [patchconstantfunc("pcf")]
  31. HsCpOut main(InputPatch<HsCpIn, NumOutPoints> patch,
  32. uint id : SV_OutputControlPointID) {
  33. HsCpOut output;
  34. output = (HsCpOut)0;
  35. return output;
  36. }