yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
84a30c8b
16.6.0
1// *** 2// per-control-point invocation of PCF from entry point return value 3// *** 4 5struct hs_in_t 6{ 7float3 val : TEXCOORD0 ; 8} ; 9 10struct hs_pcf_t 11{ 12float tfactor [ 3 ] : SV_TessFactor ; // must turn into a size 4 array in SPIR-V 13float flInFactor : SV_InsideTessFactor ; // must turn into a size 2 array in SPIR-V 14} ; 15 16struct hs_out_t 17{ 18float3 val : TEXCOORD0 ; 19} ; 20 21[ domain ( "tri" ) ] 22[ partitioning ( "fractional_odd" ) ] 23[ outputtopology ( "triangle_cw" ) ] 24[ outputcontrolpoints ( 3 ) ] 25[ patchconstantfunc ( "PCF" ) ] 26hs_out_t main ( InputPatch < hs_in_t , 3 > i , uint cpid : SV_OutputControlPointID ) 27{ 28hs_out_t o ; 29o . val = cpid ; 30return o ; 31} 32 33hs_pcf_t PCF ( const OutputPatch < hs_out_t , 3 > pcf_out ) 34{ 35hs_pcf_t o ; 36 37o . tfactor [ 0 ] = pcf_out [ 0 ] . val . x ; 38o . tfactor [ 1 ] = pcf_out [ 1 ] . val . x ; 39o . tfactor [ 2 ] = pcf_out [ 2 ] . val . x ; 40o . flInFactor = 4 ; 41 42return o ; 43}