Rename PerVertex to WgpuPerVertex for consistency (#9416)

This commit is contained in:
atlv
2026-04-14 09:14:54 -07:00
committed by GitHub
parent 981d3c89c1
commit 8dce18fc56
3 changed files with 9 additions and 9 deletions

View File

@@ -182,7 +182,7 @@ pub fn map_interpolation(
"flat" => Ok(crate::Interpolation::Flat),
"perspective" => Ok(crate::Interpolation::Perspective),
"per_vertex" => {
enable_extensions.require(ImplementedEnableExtension::PerVertex, span)?;
enable_extensions.require(ImplementedEnableExtension::WgpuPerVertex, span)?;
Ok(crate::Interpolation::PerVertex)
}
_ => Err(Box::new(Error::UnknownAttribute(span))),

View File

@@ -60,7 +60,7 @@ impl EnableExtensions {
ImplementedEnableExtension::WgpuCooperativeMatrix => &mut self.wgpu_cooperative_matrix,
ImplementedEnableExtension::DrawIndex => &mut self.draw_index,
ImplementedEnableExtension::PrimitiveIndex => &mut self.primitive_index,
ImplementedEnableExtension::PerVertex => &mut self.per_vertex,
ImplementedEnableExtension::WgpuPerVertex => &mut self.per_vertex,
ImplementedEnableExtension::WgpuBindingArray => &mut self.wgpu_binding_array,
};
*field = true;
@@ -81,7 +81,7 @@ impl EnableExtensions {
ImplementedEnableExtension::WgpuCooperativeMatrix => self.wgpu_cooperative_matrix,
ImplementedEnableExtension::DrawIndex => self.draw_index,
ImplementedEnableExtension::PrimitiveIndex => self.primitive_index,
ImplementedEnableExtension::PerVertex => self.per_vertex,
ImplementedEnableExtension::WgpuPerVertex => self.per_vertex,
ImplementedEnableExtension::WgpuBindingArray => self.wgpu_binding_array,
}
}
@@ -160,7 +160,7 @@ impl EnableExtension {
Self::SUBGROUPS => Self::Unimplemented(UnimplementedEnableExtension::Subgroups),
Self::DRAW_INDEX => Self::Implemented(ImplementedEnableExtension::DrawIndex),
Self::PRIMITIVE_INDEX => Self::Implemented(ImplementedEnableExtension::PrimitiveIndex),
Self::PER_VERTEX => Self::Implemented(ImplementedEnableExtension::PerVertex),
Self::PER_VERTEX => Self::Implemented(ImplementedEnableExtension::WgpuPerVertex),
Self::BINDING_ARRAY => Self::Implemented(ImplementedEnableExtension::WgpuBindingArray),
_ => return Err(Box::new(Error::UnknownEnableExtension(span, word))),
})
@@ -182,7 +182,7 @@ impl EnableExtension {
ImplementedEnableExtension::DrawIndex => Self::DRAW_INDEX,
ImplementedEnableExtension::PrimitiveIndex => Self::PRIMITIVE_INDEX,
ImplementedEnableExtension::WgpuRayTracingPipeline => Self::RAY_TRACING_PIPELINE,
ImplementedEnableExtension::PerVertex => Self::PER_VERTEX,
ImplementedEnableExtension::WgpuPerVertex => Self::PER_VERTEX,
ImplementedEnableExtension::WgpuBindingArray => Self::BINDING_ARRAY,
},
Self::Unimplemented(kind) => match kind {
@@ -233,7 +233,7 @@ pub enum ImplementedEnableExtension {
/// [`enable primitive-index;`]: https://www.w3.org/TR/WGSL/#extension-primitive_index
PrimitiveIndex,
/// Enables the `wgpu_per_vertex` extension, allows using `@interpolate(per_vertex)` attribute in WGSL, native only.
PerVertex,
WgpuPerVertex,
/// Enables the `wgpu_binding_array` extension, native only.
WgpuBindingArray,
}
@@ -251,7 +251,7 @@ impl ImplementedEnableExtension {
Self::WgpuCooperativeMatrix,
Self::DrawIndex,
Self::PrimitiveIndex,
Self::PerVertex,
Self::WgpuPerVertex,
Self::WgpuBindingArray,
];
@@ -274,7 +274,7 @@ impl ImplementedEnableExtension {
Self::WgpuRayTracingPipeline => C::RAY_TRACING_PIPELINE,
Self::DrawIndex => C::DRAW_INDEX,
Self::PrimitiveIndex => C::PRIMITIVE_INDEX,
Self::PerVertex => C::PER_VERTEX,
Self::WgpuPerVertex => C::PER_VERTEX,
Self::WgpuBindingArray => C::BUFFER_BINDING_ARRAY
.union(C::BUFFER_BINDING_ARRAY_NON_UNIFORM_INDEXING)
.union(C::STORAGE_BUFFER_BINDING_ARRAY)

View File

@@ -237,7 +237,7 @@ impl Capabilities {
Self::RAY_HIT_VERTEX_POSITION => Some(Ext::WgpuRayQueryVertexReturn),
Self::COOPERATIVE_MATRIX => Some(Ext::WgpuCooperativeMatrix),
Self::RAY_TRACING_PIPELINE => Some(Ext::WgpuRayTracingPipeline),
Self::PER_VERTEX => Some(Ext::PerVertex),
Self::PER_VERTEX => Some(Ext::WgpuPerVertex),
Self::BUFFER_BINDING_ARRAY
| Self::BUFFER_BINDING_ARRAY_NON_UNIFORM_INDEXING
| Self::STORAGE_BUFFER_BINDING_ARRAY