mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 01:54:31 +01:00
Fix the validation of vertex/index/instance ranges in render bundles
This commit is contained in:
1 parent
d47534ed9a
commit
e2e9ef5547
5 files changed
+131
-88
No files matched your search
@@ -8,7 +8,7 @@ use crate::{
|
||||
track::UsageConflict,
|
||||
validation::{MissingBufferUsageError, MissingTextureUsageError},
|
||||
};
|
||||
use wgt::{BufferAddress, BufferSize, Color};
|
||||
use wgt::{BufferAddress, BufferSize, Color, VertexStepMode};
|
||||
|
||||
use std::num::NonZeroU32;
|
||||
use thiserror::Error;
|
||||
@@ -33,6 +33,13 @@ pub enum DrawError {
|
||||
vertex_limit: u64,
|
||||
slot: u32,
|
||||
},
|
||||
#[error("{step_mode:?} buffer out of bounds at slot {slot}. Offset {offset} beyond limit {limit}. Did you bind the correct `Vertex` step-rate vertex buffer?")]
|
||||
VertexOutOfBounds {
|
||||
step_mode: VertexStepMode,
|
||||
offset: u64,
|
||||
limit: u64,
|
||||
slot: u32,
|
||||
},
|
||||
#[error("Instance {last_instance} extends beyond limit {instance_limit} imposed by the buffer in slot {slot}. Did you bind the correct `Instance` step-rate vertex buffer?")]
|
||||
InstanceBeyondLimit {
|
||||
last_instance: u64,
|
||||
|
||||
Reference in new issue
Block a user