diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index 1d0f7cf717..983f1b724f 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1715,7 +1715,7 @@ impl Global { } let max_vertex_buffers = device.limits.max_vertex_buffers; - if slot > max_vertex_buffers { + if slot >= max_vertex_buffers { return Err(RenderCommandError::VertexBufferIndexOutOfRange { index: slot, max: max_vertex_buffers,