@@ -274,15 +274,13 @@ g.test('render_pass_commands')
274
274
`
275
275
Test that functions of GPURenderPassEncoder generate a validation error if the encoder or the
276
276
pass is already finished.
277
-
278
- - TODO: Consider testing: nothing before command, end before command, end+finish before command.
279
277
`
280
278
)
281
279
. params ( u =>
282
280
u
283
281
. combine ( 'command' , kRenderPassEncoderCommands )
284
282
. beginSubcases ( )
285
- . combine ( 'finishBeforeCommand' , [ false , true ] )
283
+ . combine ( 'finishBeforeCommand' , [ 'no' , 'pass' , 'encoder' ] )
286
284
)
287
285
. fn ( t => {
288
286
const { command, finishBeforeCommand } = t . params ;
@@ -305,8 +303,10 @@ g.test('render_pass_commands')
305
303
306
304
const bindGroup = t . createBindGroupForTest ( ) ;
307
305
308
- if ( finishBeforeCommand ) {
306
+ if ( finishBeforeCommand !== 'no' ) {
309
307
renderPass . end ( ) ;
308
+ }
309
+ if ( finishBeforeCommand === 'encoder' ) {
310
310
encoder . finish ( ) ;
311
311
}
312
312
@@ -420,7 +420,9 @@ g.test('render_pass_commands')
420
420
default :
421
421
unreachable ( ) ;
422
422
}
423
- } , finishBeforeCommand ) ;
423
+ } , finishBeforeCommand === 'encoder' ) ;
424
+ // TODO(https://github.com/gpuweb/gpuweb/issues/5207): resolve whether this
425
+ // is correct or should be changed to `finishBeforeCommand !== 'no'`.
424
426
} ) ;
425
427
426
428
g . test ( 'render_bundle_commands' )
@@ -524,15 +526,13 @@ g.test('compute_pass_commands')
524
526
`
525
527
Test that functions of GPUComputePassEncoder generate a validation error if the encoder or the
526
528
pass is already finished.
527
-
528
- - TODO: Consider testing: nothing before command, end before command, end+finish before command.
529
529
`
530
530
)
531
531
. params ( u =>
532
532
u
533
533
. combine ( 'command' , kComputePassEncoderCommands )
534
534
. beginSubcases ( )
535
- . combine ( 'finishBeforeCommand' , [ false , true ] )
535
+ . combine ( 'finishBeforeCommand' , [ 'no' , 'pass' , 'encoder' ] )
536
536
)
537
537
. fn ( t => {
538
538
const { command, finishBeforeCommand } = t . params ;
@@ -549,8 +549,10 @@ g.test('compute_pass_commands')
549
549
550
550
const bindGroup = t . createBindGroupForTest ( ) ;
551
551
552
- if ( finishBeforeCommand ) {
552
+ if ( finishBeforeCommand !== 'no' ) {
553
553
computePass . end ( ) ;
554
+ }
555
+ if ( finishBeforeCommand === 'encoder' ) {
554
556
encoder . finish ( ) ;
555
557
}
556
558
@@ -594,5 +596,7 @@ g.test('compute_pass_commands')
594
596
default :
595
597
unreachable ( ) ;
596
598
}
597
- } , finishBeforeCommand ) ;
599
+ } , finishBeforeCommand === 'encoder' ) ;
600
+ // TODO(https://github.com/gpuweb/gpuweb/issues/5207): resolve whether this
601
+ // is correct or should be changed to `finishBeforeCommand !== 'no'`.
598
602
} ) ;
0 commit comments