wgpu

Type Alias ShaderModuleDescriptorPassthrough

Source
pub type ShaderModuleDescriptorPassthrough<'a> = CreateShaderModuleDescriptorPassthrough<'a, Label<'a>>;
Expand description

Descriptor for a shader module that will bypass wgpu’s shader tooling, for use with Device::create_shader_module_passthrough.

This type is unique to the Rust API of wgpu. In the WebGPU specification, only WGSL source code strings are accepted.

Aliased Type§

enum ShaderModuleDescriptorPassthrough<'a> {
    SpirV(ShaderModuleDescriptorSpirV<'a, Option<&'a str>>),
    Msl(ShaderModuleDescriptorMsl<'a, Option<&'a str>>),
}

Variants§

§

SpirV(ShaderModuleDescriptorSpirV<'a, Option<&'a str>>)

Passthrough for SPIR-V binaries.

§

Msl(ShaderModuleDescriptorMsl<'a, Option<&'a str>>)

Passthrough for MSL source code.

Implementations

Source§

impl<'a, L> CreateShaderModuleDescriptorPassthrough<'a, L>

Source

pub fn map_label<K>( &self, fun: impl FnOnce(&L) -> K, ) -> CreateShaderModuleDescriptorPassthrough<'_, K>

Takes a closure and maps the label of the shader module descriptor into another.

Source

pub fn label(&'a self) -> &'a L

Returns the label of shader module passthrough descriptor.

Source

pub fn trace_data(&self) -> &[u8]

Available on crate feature trace only.

Returns the source data for tracing purpose.

Source

pub fn trace_binary_ext(&self) -> &'static str

Available on crate feature trace only.

Returns the binary file extension for tracing purpose.

Trait Implementations

Source§

impl<'a, L> Clone for CreateShaderModuleDescriptorPassthrough<'a, L>
where L: Clone,

Source§

fn clone(&self) -> CreateShaderModuleDescriptorPassthrough<'a, L>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, L> Debug for CreateShaderModuleDescriptorPassthrough<'a, L>
where L: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more