pub struct Options {
pub stage: ShaderStage,
pub defines: HashMap<String, String, BuildHasherDefault<FxHasher>>,
}
Available on (
wgpu_core
or naga
) and crate feature glsl-in
only.Expand description
Per-shader options passed to parse
.
The From
trait is implemented for ShaderStage
to provide a quick way
to create an Options
instance.
Options::from(ShaderStage::Vertex);
Fields§
§stage: ShaderStage
The shader stage in the pipeline.
defines: HashMap<String, String, BuildHasherDefault<FxHasher>>
Preprocesor definitions to be used, akin to having
#define key value
for each key value pair in the map.
Trait Implementations§
source§impl From<ShaderStage> for Options
impl From<ShaderStage> for Options
source§fn from(stage: ShaderStage) -> Options
fn from(stage: ShaderStage) -> Options
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more