Skip to content

Commit

Permalink
Fix max_vertex_buffers validation (#4708)
Browse files Browse the repository at this point in the history
  • Loading branch information
nical authored Nov 20, 2023
1 parent 6e21f7a commit 6786548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wgpu-core/src/command/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
}

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,
Expand Down

0 comments on commit 6786548

Please sign in to comment.