From 20fda698341efbdc870b8027d6d49f5bf3f36109 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 6 Feb 2024 14:07:32 +0100 Subject: [PATCH] Fix the validation of max_bindings_per_bind_group --- wgpu-core/src/device/bgl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-core/src/device/bgl.rs b/wgpu-core/src/device/bgl.rs index cc7efc7e0c..d606f049a3 100644 --- a/wgpu-core/src/device/bgl.rs +++ b/wgpu-core/src/device/bgl.rs @@ -68,7 +68,7 @@ impl EntryMap { ) -> Result { 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,