diff --git a/naga/src/front/wgsl/parse/conv.rs b/naga/src/front/wgsl/parse/conv.rs index 9fb003dcbe1..32b00d1c0c0 100644 --- a/naga/src/front/wgsl/parse/conv.rs +++ b/naga/src/front/wgsl/parse/conv.rs @@ -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))), diff --git a/naga/src/front/wgsl/parse/directive/enable_extension.rs b/naga/src/front/wgsl/parse/directive/enable_extension.rs index 80e58e6078a..34733ed6939 100644 --- a/naga/src/front/wgsl/parse/directive/enable_extension.rs +++ b/naga/src/front/wgsl/parse/directive/enable_extension.rs @@ -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) diff --git a/naga/src/valid/mod.rs b/naga/src/valid/mod.rs index 5eca1549ebb..2e37295fcb4 100644 --- a/naga/src/valid/mod.rs +++ b/naga/src/valid/mod.rs @@ -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