Files
wgpu/src/front/mod.rs
T
Matus Talcik c12c9a9fac init control flow graph (#122)
format

major refactor


Change spirv to spirv_headers


Remove files


First translation to naga + format


Fix Int Constant error


Don't add unnecessary blocks.


Some cleanups


format


remove constructs


docs


fix debug leftovers


format, clippy


satisfy clippy
2020-08-23 23:14:51 -04:00

34 lines
729 B
Rust

//! Parsers which load shaders into memory.
#[cfg(feature = "glsl")]
pub mod glsl;
#[cfg(feature = "glsl-new")]
pub mod glsl_new;
#[cfg(feature = "spirv-in")]
pub mod spv;
pub mod wgsl;
use crate::arena::Arena;
pub const GENERATOR: u32 = 0;
impl crate::Module {
fn from_header(header: crate::Header) -> Self {
crate::Module {
header,
types: Arena::new(),
constants: Arena::new(),
global_variables: Arena::new(),
functions: Arena::new(),
entry_points: Vec::new(),
}
}
fn generate_empty() -> Self {
Self::from_header(crate::Header {
version: (1, 0, 0),
generator: GENERATOR,
})
}
}