Fix max_vertex_buffers validation (#4708)

This commit is contained in:
Nicolas Silva
2023-11-20 10:17:19 +01:00
committed by GitHub
parent 6e21f7a929
commit 6786548d1e

View File

@@ -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,