Skip to content

Commit

Permalink
Fix max_vertex_buffers validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nical committed Nov 17, 2023
1 parent acaeb8d commit 9e25ca4
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 @@ -1715,7 +1715,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 9e25ca4

Please sign in to comment.