mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-01-09 19:48:47 -05:00
Fix error message when render pipeline vertex attribute location is greater or equal to the maximum number of vertex attributes (fixes #8064) (#8065)
This commit is contained in:
@@ -3697,7 +3697,7 @@ impl Device {
|
||||
|
||||
if attribute.shader_location >= self.limits.max_vertex_attributes {
|
||||
return Err(
|
||||
pipeline::CreateRenderPipelineError::TooManyVertexAttributes {
|
||||
pipeline::CreateRenderPipelineError::VertexAttributeLocationTooLarge {
|
||||
given: attribute.shader_location,
|
||||
limit: self.limits.max_vertex_attributes,
|
||||
},
|
||||
|
||||
@@ -624,6 +624,8 @@ pub enum CreateRenderPipelineError {
|
||||
TooManyVertexBuffers { given: u32, limit: u32 },
|
||||
#[error("The total number of vertex attributes {given} exceeds the limit {limit}")]
|
||||
TooManyVertexAttributes { given: u32, limit: u32 },
|
||||
#[error("Vertex attribute location {given} must be less than limit {limit}")]
|
||||
VertexAttributeLocationTooLarge { given: u32, limit: u32 },
|
||||
#[error("Vertex buffer {index} stride {given} exceeds the limit {limit}")]
|
||||
VertexStrideTooLarge { index: u32, given: u32, limit: u32 },
|
||||
#[error("Vertex attribute at location {location} stride {given} exceeds the limit {limit}")]
|
||||
@@ -708,6 +710,7 @@ impl WebGpuError for CreateRenderPipelineError {
|
||||
| Self::InvalidSampleCount(_)
|
||||
| Self::TooManyVertexBuffers { .. }
|
||||
| Self::TooManyVertexAttributes { .. }
|
||||
| Self::VertexAttributeLocationTooLarge { .. }
|
||||
| Self::VertexStrideTooLarge { .. }
|
||||
| Self::UnalignedVertexStride { .. }
|
||||
| Self::InvalidVertexAttributeOffset { .. }
|
||||
|
||||
Reference in New Issue
Block a user