@@ -217,17 +217,21 @@ static MINIMUM_BUFFER_BINDING_SIZE_LAYOUT: GpuTestConfiguration = GpuTestConfigu
217217 push_constant_ranges : & [ ] ,
218218 } ) ;
219219
220- wgpu_test:: fail ( & ctx. device , || {
221- ctx. device
222- . create_compute_pipeline ( & wgpu:: ComputePipelineDescriptor {
223- label : None ,
224- layout : Some ( & pipeline_layout) ,
225- module : & shader_module,
226- entry_point : "main" ,
227- compilation_options : Default :: default ( ) ,
228- cache : None ,
229- } ) ;
230- } ) ;
220+ wgpu_test:: fail (
221+ & ctx. device ,
222+ || {
223+ ctx. device
224+ . create_compute_pipeline ( & wgpu:: ComputePipelineDescriptor {
225+ label : None ,
226+ layout : Some ( & pipeline_layout) ,
227+ module : & shader_module,
228+ entry_point : "main" ,
229+ compilation_options : Default :: default ( ) ,
230+ cache : None ,
231+ } ) ;
232+ } ,
233+ None ,
234+ ) ;
231235 } ) ;
232236
233237/// The WebGPU algorithm [validating shader binding][vsb] requires
@@ -314,21 +318,25 @@ static MINIMUM_BUFFER_BINDING_SIZE_DISPATCH: GpuTestConfiguration = GpuTestConfi
314318 } ] ,
315319 } ) ;
316320
317- wgpu_test:: fail ( & ctx. device , || {
318- let mut encoder = ctx. device . create_command_encoder ( & Default :: default ( ) ) ;
321+ wgpu_test:: fail (
322+ & ctx. device ,
323+ || {
324+ let mut encoder = ctx. device . create_command_encoder ( & Default :: default ( ) ) ;
319325
320- let mut pass = encoder. begin_compute_pass ( & wgpu:: ComputePassDescriptor {
321- label : None ,
322- timestamp_writes : None ,
323- } ) ;
326+ let mut pass = encoder. begin_compute_pass ( & wgpu:: ComputePassDescriptor {
327+ label : None ,
328+ timestamp_writes : None ,
329+ } ) ;
324330
325- pass. set_bind_group ( 0 , & bind_group, & [ ] ) ;
326- pass. set_pipeline ( & pipeline) ;
327- pass. dispatch_workgroups ( 1 , 1 , 1 ) ;
331+ pass. set_bind_group ( 0 , & bind_group, & [ ] ) ;
332+ pass. set_pipeline ( & pipeline) ;
333+ pass. dispatch_workgroups ( 1 , 1 , 1 ) ;
328334
329- drop ( pass) ;
330- let _ = encoder. finish ( ) ;
331- } ) ;
335+ drop ( pass) ;
336+ let _ = encoder. finish ( ) ;
337+ } ,
338+ None ,
339+ ) ;
332340 } ) ;
333341
334342#[ gpu_test]
@@ -346,16 +354,15 @@ static CLEAR_OFFSET_OUTSIDE_RESOURCE_BOUNDS: GpuTestConfiguration = GpuTestConfi
346354
347355 let out_of_bounds = size. checked_add ( wgpu:: COPY_BUFFER_ALIGNMENT ) . unwrap ( ) ;
348356
349- ctx. device . push_error_scope ( wgpu:: ErrorFilter :: Validation ) ;
350- ctx. device
351- . create_command_encoder ( & Default :: default ( ) )
352- . clear_buffer ( & buffer, out_of_bounds, None ) ;
353- let err_msg = pollster:: block_on ( ctx. device . pop_error_scope ( ) )
354- . unwrap ( )
355- . to_string ( ) ;
356- assert ! ( err_msg. contains(
357- "Clear of 20..20 would end up overrunning the bounds of the buffer of size 16"
358- ) ) ;
357+ wgpu_test:: fail (
358+ & ctx. device ,
359+ || {
360+ ctx. device
361+ . create_command_encoder ( & Default :: default ( ) )
362+ . clear_buffer ( & buffer, out_of_bounds, None )
363+ } ,
364+ Some ( "Clear of 20..20 would end up overrunning the bounds of the buffer of size 16" ) ,
365+ ) ;
359366 } ) ;
360367
361368#[ gpu_test]
@@ -373,19 +380,20 @@ static CLEAR_OFFSET_PLUS_SIZE_OUTSIDE_U64_BOUNDS: GpuTestConfiguration =
373380 let max_valid_offset = u64:: MAX - ( u64:: MAX % wgpu:: COPY_BUFFER_ALIGNMENT ) ;
374381 let smallest_aligned_invalid_size = wgpu:: COPY_BUFFER_ALIGNMENT ;
375382
376- ctx. device . push_error_scope ( wgpu:: ErrorFilter :: Validation ) ;
377- ctx. device
378- . create_command_encoder ( & Default :: default ( ) )
379- . clear_buffer (
380- & buffer,
381- max_valid_offset,
382- Some ( smallest_aligned_invalid_size) ,
383- ) ;
384- let err_msg = pollster:: block_on ( ctx. device . pop_error_scope ( ) )
385- . unwrap ( )
386- . to_string ( ) ;
387- assert ! ( err_msg. contains( concat!(
388- "Clear starts at offset 18446744073709551612 with size of 4, " ,
389- "but these added together exceed `u64::MAX`"
390- ) ) ) ;
383+ wgpu_test:: fail (
384+ & ctx. device ,
385+ || {
386+ ctx. device
387+ . create_command_encoder ( & Default :: default ( ) )
388+ . clear_buffer (
389+ & buffer,
390+ max_valid_offset,
391+ Some ( smallest_aligned_invalid_size) ,
392+ )
393+ } ,
394+ Some ( concat ! (
395+ "Clear starts at offset 18446744073709551612 with size of 4, " ,
396+ "but these added together exceed `u64::MAX`"
397+ ) ) ,
398+ ) ;
391399 } ) ;
0 commit comments