Add multiview wgsl builtin

This commit is contained in:
Layl Bongers authored and Dzmitry Malyshau committed 2021-11-18 09:57:37 -05:00
1 parent 6a5b33fa24
commit 29571cc4cf
2 files changed
+2

No files matched your search

+1
View File
@@ -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,
}
}
+1
View File
@@ -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,