@@ -9,10 +9,20 @@ function getPipelineDescriptor(
99 frontFacing : boolean ,
1010 sampleIndex : boolean ,
1111 sampleMaskIn : boolean ,
12- sampleMaskOut : boolean
12+ sampleMaskOut : boolean ,
13+ primitiveIndex : boolean ,
14+ subgroupInvocationId : boolean ,
15+ subgroupSize : boolean
1316) : GPURenderPipelineDescriptor {
1417 const vertexOutputDeductions = pointList ? 1 : 0 ;
15- const fragmentInputDeductions = [ frontFacing , sampleIndex , sampleMaskIn ]
18+ const fragmentInputDeductions = [
19+ frontFacing ,
20+ sampleIndex ,
21+ sampleMaskIn ,
22+ primitiveIndex ,
23+ subgroupInvocationId ,
24+ subgroupSize ,
25+ ]
1626 . map ( p => ( p ? 1 : 0 ) as number )
1727 . reduce ( ( acc , p ) => acc + p ) ;
1828
@@ -101,6 +111,10 @@ g.test('createRenderPipeline,at_over')
101111 . combine ( 'sampleIndex' , [ false , true ] )
102112 . combine ( 'sampleMaskIn' , [ false , true ] )
103113 . combine ( 'sampleMaskOut' , [ false , true ] )
114+ . beginSubcases ( )
115+ . combine ( 'primitiveIndex' , [ false , true ] )
116+ . combine ( 'subgroupInvocationId' , [ false , true ] )
117+ . combine ( 'subgroupSize' , [ false , true ] )
104118 )
105119 . beforeAllSubcases ( t => {
106120 if ( t . isCompatibility ) {
@@ -121,19 +135,36 @@ g.test('createRenderPipeline,at_over')
121135 sampleIndex,
122136 sampleMaskIn,
123137 sampleMaskOut,
138+ primitiveIndex,
139+ subgroupInvocationId,
140+ subgroupSize,
124141 } = t . params ;
142+
125143 await t . testDeviceWithRequestedMaximumLimits (
126144 limitTest ,
127145 testValueName ,
128146 async ( { device, testValue, shouldError } ) => {
147+ if ( primitiveIndex ) {
148+ t . skipIfDeviceDoesNotHaveFeature ( 'primitive-index' ) ;
149+ return ;
150+ }
151+
152+ if ( subgroupInvocationId || subgroupSize ) {
153+ t . skipIfDeviceDoesNotHaveFeature ( 'subgroups' ) ;
154+ return ;
155+ }
156+
129157 const pipelineDescriptor = getPipelineDescriptor (
130158 device ,
131159 testValue ,
132160 pointList ,
133161 frontFacing ,
134162 sampleIndex ,
135163 sampleMaskIn ,
136- sampleMaskOut
164+ sampleMaskOut ,
165+ primitiveIndex ,
166+ subgroupInvocationId ,
167+ subgroupSize
137168 ) ;
138169
139170 await t . testCreateRenderPipeline ( pipelineDescriptor , async , shouldError ) ;
0 commit comments