mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Add multiview wgsl builtin
This commit is contained in:
committed by
Dzmitry Malyshau
parent
6a5b33fa24
commit
29571cc4cf
@@ -1841,6 +1841,7 @@ fn builtin_str(built_in: crate::BuiltIn) -> Option<&'static str> {
|
||||
Bi::SampleIndex => Some("sample_index"),
|
||||
Bi::SampleMask => Some("sample_mask"),
|
||||
Bi::PrimitiveIndex => Some("primitive_index"),
|
||||
Bi::ViewIndex => Some("view_index"),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ pub fn map_built_in(word: &str, span: Span) -> Result<crate::BuiltIn, Error<'_>>
|
||||
// vertex
|
||||
"vertex_index" => crate::BuiltIn::VertexIndex,
|
||||
"instance_index" => crate::BuiltIn::InstanceIndex,
|
||||
"view_index" => crate::BuiltIn::ViewIndex,
|
||||
// fragment
|
||||
"front_facing" => crate::BuiltIn::FrontFacing,
|
||||
"frag_depth" => crate::BuiltIn::FragDepth,
|
||||
|
||||
Reference in New Issue
Block a user