Debian Codegraph @

third_party/rust/naga/src/common/mod.rs

raw
1 //! Code common to the front and backends for specific languages.
2
3 mod diagnostic_debug;
4 mod diagnostic_display;
5 pub mod predeclared;
6 pub mod wgsl;
7
8 pub use diagnostic_debug::{DiagnosticDebug, ForDebug, ForDebugWithTypes};
9 pub use diagnostic_display::DiagnosticDisplay;
10
11 /// Helper function that returns the string corresponding to the [`VectorSize`](crate::VectorSize)
12 pub const fn vector_size_str(size: crate::VectorSize) -> &'static str {
13 match size {
14 crate::VectorSize::Bi => "2",
15 crate::VectorSize::Tri => "3",
16 crate::VectorSize::Quad => "4",
17 }
18 }