ShaderModuleDescriptorPassthrough

Type Alias ShaderModuleDescriptorPassthrough 

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

Descriptor for a shader module given by any of several sources. At least one of the shader types that may be used by the backend must be Some

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

Aliased Type§

pub struct ShaderModuleDescriptorPassthrough<'a> {
    pub label: Option<&'a str>,
    pub num_workgroups: (u32, u32, u32),
    pub spirv: Option<Cow<'a, [u32]>>,
    pub dxil: Option<Cow<'a, [u8]>>,
    pub hlsl: Option<Cow<'a, str>>,
    pub metallib: Option<Cow<'a, [u8]>>,
    pub msl: Option<Cow<'a, str>>,
    pub glsl: Option<Cow<'a, str>>,
    pub wgsl: Option<Cow<'a, str>>,
}

Fields§

§label: Option<&'a str>

Debug label of the shader module. This will show up in graphics debuggers for easy identification.

§num_workgroups: (u32, u32, u32)

Number of workgroups in each dimension x, y and z. Unused for Spir-V.

§spirv: Option<Cow<'a, [u32]>>

Binary SPIR-V data, in 4-byte words.

§dxil: Option<Cow<'a, [u8]>>

Shader DXIL source.

§hlsl: Option<Cow<'a, str>>

Shader HLSL source.

§metallib: Option<Cow<'a, [u8]>>

Shader MetalLib source.

§msl: Option<Cow<'a, str>>

Shader MSL source.

§glsl: Option<Cow<'a, str>>

Shader GLSL source (currently unused).

§wgsl: Option<Cow<'a, str>>

Shader WGSL source.