Struct wgpu::core::pipeline::ProgrammableStageDescriptor
pub struct ProgrammableStageDescriptor<'a> {
pub module: Id<ShaderModule>,
pub entry_point: Option<Cow<'a, str>>,
pub constants: Cow<'a, HashMap<String, f64>>,
pub zero_initialize_workgroup_memory: bool,
}
Available on
wgpu_core
only.Expand description
Describes a programmable pipeline stage.
Fields§
§module: Id<ShaderModule>
The compiled shader module for this stage.
entry_point: Option<Cow<'a, str>>
The name of the entry point in the compiled shader. The name is selected using the following logic:
- If
Some(name)
is specified, there must be a function with this name in the shader. - If a single entry point associated with this stage must be in the shader, then proceed as
if
Some(…)
was specified with that entry point’s name.
constants: Cow<'a, HashMap<String, f64>>
Specifies the values of pipeline-overridable constants in the shader module.
If an @id
attribute was specified on the declaration,
the key must be the pipeline constant ID as a decimal ASCII number; if not,
the key must be the constant’s identifier name.
The value may represent any of WGSL’s concrete scalar types.
zero_initialize_workgroup_memory: bool
Whether workgroup scoped memory will be initialized with zero values for this stage.
This is required by the WebGPU spec, but may have overhead which can be avoided for cross-platform applications
Trait Implementations§
§impl<'a> Clone for ProgrammableStageDescriptor<'a>
impl<'a> Clone for ProgrammableStageDescriptor<'a>
§fn clone(&self) -> ProgrammableStageDescriptor<'a>
fn clone(&self) -> ProgrammableStageDescriptor<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<'a> Debug for ProgrammableStageDescriptor<'a>
impl<'a> Debug for ProgrammableStageDescriptor<'a>
§impl<'de, 'a> Deserialize<'de> for ProgrammableStageDescriptor<'a>
impl<'de, 'a> Deserialize<'de> for ProgrammableStageDescriptor<'a>
§fn deserialize<__D>(
__deserializer: __D
) -> Result<ProgrammableStageDescriptor<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ProgrammableStageDescriptor<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<'a> Serialize for ProgrammableStageDescriptor<'a>
impl<'a> Serialize for ProgrammableStageDescriptor<'a>
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ProgrammableStageDescriptor<'a>
impl<'a> Send for ProgrammableStageDescriptor<'a>
impl<'a> Sync for ProgrammableStageDescriptor<'a>
impl<'a> Unpin for ProgrammableStageDescriptor<'a>
impl<'a> UnwindSafe for ProgrammableStageDescriptor<'a>
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