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§
struct ShaderModuleDescriptorPassthrough<'a> {
pub entry_point: String,
pub label: Option<&'a str>,
pub num_workgroups: (u32, u32, u32),
pub runtime_checks: ShaderRuntimeChecks,
pub spirv: Option<Cow<'a, [u32]>>,
pub dxil: Option<Cow<'a, [u8]>>,
pub msl: Option<Cow<'a, str>>,
pub hlsl: Option<Cow<'a, str>>,
pub glsl: Option<Cow<'a, str>>,
pub wgsl: Option<Cow<'a, str>>,
}
Fields§
§entry_point: String
Entrypoint. Unused for Spir-V.
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.
runtime_checks: ShaderRuntimeChecks
Runtime checks that should be enabled.
spirv: Option<Cow<'a, [u32]>>
Binary SPIR-V data, in 4-byte words.
dxil: Option<Cow<'a, [u8]>>
Shader DXIL source.
msl: Option<Cow<'a, str>>
Shader MSL source.
hlsl: Option<Cow<'a, str>>
Shader HLSL source.
glsl: Option<Cow<'a, str>>
Shader GLSL source (currently unused).
wgsl: Option<Cow<'a, str>>
Shader WGSL source.