Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion naga/src/front/wgsl/parse/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))),
Expand Down
14 changes: 7 additions & 7 deletions naga/src/front/wgsl/parse/directive/enable_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
}
}
Expand Down Expand Up @@ -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))),
})
Expand All @@ -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 {
Expand Down Expand Up @@ -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,
}
Expand All @@ -251,7 +251,7 @@ impl ImplementedEnableExtension {
Self::WgpuCooperativeMatrix,
Self::DrawIndex,
Self::PrimitiveIndex,
Self::PerVertex,
Self::WgpuPerVertex,
Self::WgpuBindingArray,
];

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion naga/src/valid/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down