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