File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use crate::{gfx_select, SurfaceId};
19
19
20
20
#[ cfg( not( feature = "remote" ) ) ]
21
21
use bitflags:: bitflags;
22
- use log:: info;
22
+ use log:: { info, warn } ;
23
23
#[ cfg( feature = "remote" ) ]
24
24
use serde:: { Deserialize , Serialize } ;
25
25
@@ -466,10 +466,14 @@ pub fn adapter_request_device<B: GfxBackend>(
466
466
BIND_BUFFER_ALIGNMENT % limits. min_uniform_buffer_offset_alignment,
467
467
"Adapter uniform buffer offset alignment not compatible with WGPU"
468
468
) ;
469
- assert ! (
470
- u32 :: from( limits. max_bound_descriptor_sets) >= desc. limits. max_bind_groups,
471
- "Adapter does not support the requested max_bind_groups"
472
- ) ;
469
+ if desc. limits . max_bind_groups == 0 {
470
+ warn ! ( "max_bind_groups limit is missing" ) ;
471
+ } else {
472
+ assert ! (
473
+ u32 :: from( limits. max_bound_descriptor_sets) >= desc. limits. max_bind_groups,
474
+ "Adapter does not support the requested max_bind_groups"
475
+ ) ;
476
+ }
473
477
474
478
let mem_props = adapter. physical_device . memory_properties ( ) ;
475
479
You can’t perform that action at this time.
0 commit comments