Files
wgpu/src/front/mod.rs
T
Pelle Johnsen 6f0f551bac New GLSL frontend using pomelo (#87)
* Add initial pomelo glsl work

* Fix ref to glsl_old

* Fix idents with numbers in lexer

* Use glsl_new for .vert in convert example

Controlled by PREFER_GLSL_NEW=1 env var

Also add simple test files

* Start making parser look like spec

* Port 'old' lex.rs to glsl_new

* Apply fixes after rebasing

* Fix clippy issue

* Fix PR comments

- Make into optional feature glsl-new

- Minor code style improvements
2020-06-30 10:42:50 -04:00

34 lines
726 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")]
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,
})
}
}