pub struct Module {
pub types: UniqueArena<Type>,
pub constants: Arena<Constant>,
pub global_variables: Arena<GlobalVariable>,
pub functions: Arena<Function>,
pub entry_points: Vec<EntryPoint>,
}
Expand description
Shader module.
A module is a set of constants, global variables and functions, as well as the types required to define them.
Some functions are marked as entry points, to be used in a certain shader stage.
To create a new module, use the Default
implementation.
Alternatively, you can load an existing shader using one of the available front ends.
When finished, you can export modules using one of the available backends.
Fields
types: UniqueArena<Type>
Storage for the types defined in this module.
constants: Arena<Constant>
Storage for the constants defined in this module.
global_variables: Arena<GlobalVariable>
Storage for the global variables defined in this module.
functions: Arena<Function>
Storage for the functions defined in this module.
Each function must appear in this arena strictly before all its callers. Recursion is not supported.
entry_points: Vec<EntryPoint>
Entry points.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more