Skip to content

Commit

Permalink
Fix the validation of max_bindings_per_bind_group
Browse files Browse the repository at this point in the history
  • Loading branch information
nical authored and teoxoy committed Feb 6, 2024
1 parent faed98b commit 20fda69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wgpu-core/src/device/bgl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl EntryMap {
) -> Result<Self, binding_model::CreateBindGroupLayoutError> {
let mut inner = FastIndexMap::with_capacity_and_hasher(entries.len(), Default::default());
for entry in entries {
if entry.binding > device_limits.max_bindings_per_bind_group {
if entry.binding >= device_limits.max_bindings_per_bind_group {
return Err(
binding_model::CreateBindGroupLayoutError::InvalidBindingIndex {
binding: entry.binding,
Expand Down

0 comments on commit 20fda69

Please sign in to comment.