pub struct CreateShaderModuleDescriptorPassthrough<'a, L> {
pub label: L,
pub entry_points: Cow<'a, [PassthroughShaderEntryPoint<'a>]>,
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>>,
}Expand description
Descriptor for a shader module given by any of several sources.
These shaders are passed through directly to the underlying api.
At least one shader type that may be used by the backend must be Some or a panic is raised.
Note that you shouldn’t expect this to work with bindings except on SPIR-V, and even on SPIR-V there will be some caveats.
Fields§
§label: LDebug label of the shader module. This will show up in graphics debuggers for easy identification.
entry_points: Cow<'a, [PassthroughShaderEntryPoint<'a>]>The list of entry points and their corresponding workgroup sizes.
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.
Implementations§
Source§impl<'a, L> CreateShaderModuleDescriptorPassthrough<'a, L>
impl<'a, L> CreateShaderModuleDescriptorPassthrough<'a, L>
Sourcepub fn map_label<K>(
&self,
fun: impl FnOnce(&L) -> K,
) -> CreateShaderModuleDescriptorPassthrough<'a, K>
pub fn map_label<K>( &self, fun: impl FnOnce(&L) -> K, ) -> CreateShaderModuleDescriptorPassthrough<'a, K>
Takes a closure and maps the label of the shader module descriptor into another.
Trait Implementations§
Source§impl<'a, L: Clone> Clone for CreateShaderModuleDescriptorPassthrough<'a, L>
impl<'a, L: Clone> Clone for CreateShaderModuleDescriptorPassthrough<'a, L>
Source§fn clone(&self) -> CreateShaderModuleDescriptorPassthrough<'a, L>
fn clone(&self) -> CreateShaderModuleDescriptorPassthrough<'a, L>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more