Skip to content

Commit

Permalink
Merge #356
Browse files Browse the repository at this point in the history
356: Allow max_bind_groups to be missing, for now r=kvark a=kvark

Fixes  #355

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
  • Loading branch information
bors[bot] and kvark authored Oct 24, 2019
2 parents a04a4b1 + f3a0dd9 commit ae5a78f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions wgpu-native/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{gfx_select, SurfaceId};

#[cfg(not(feature = "remote"))]
use bitflags::bitflags;
use log::info;
use log::{info, warn};
#[cfg(feature = "remote")]
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -466,10 +466,14 @@ pub fn adapter_request_device<B: GfxBackend>(
BIND_BUFFER_ALIGNMENT % limits.min_uniform_buffer_offset_alignment,
"Adapter uniform buffer offset alignment not compatible with WGPU"
);
assert!(
u32::from(limits.max_bound_descriptor_sets) >= desc.limits.max_bind_groups,
"Adapter does not support the requested max_bind_groups"
);
if desc.limits.max_bind_groups == 0 {
warn!("max_bind_groups limit is missing");
} else {
assert!(
u32::from(limits.max_bound_descriptor_sets) >= desc.limits.max_bind_groups,
"Adapter does not support the requested max_bind_groups"
);
}

let mem_props = adapter.physical_device.memory_properties();

Expand Down

0 comments on commit ae5a78f

Please sign in to comment.