pub struct CreateShaderModuleDescriptorPassthrough<'a, L> {
pub entry_point: String,
pub label: L,
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>>,
}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.
Fields§
§entry_point: StringEntrypoint. Unused for Spir-V.
label: LDebug 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: ShaderRuntimeChecksRuntime 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.
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.
Sourcepub fn trace_data(&self) -> &[u8] ⓘ
Available on crate feature trace only.
pub fn trace_data(&self) -> &[u8] ⓘ
trace only.Returns the source data for tracing purpose.
Sourcepub fn trace_binary_ext(&self) -> &'static str
Available on crate feature trace only.
pub fn trace_binary_ext(&self) -> &'static str
trace only.Returns the binary file extension for tracing purpose.
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a, L: Debug> Debug for CreateShaderModuleDescriptorPassthrough<'a, L>
impl<'a, L: Debug> Debug for CreateShaderModuleDescriptorPassthrough<'a, L>
Source§impl<'a, L: Default> Default for CreateShaderModuleDescriptorPassthrough<'a, L>
impl<'a, L: Default> Default for CreateShaderModuleDescriptorPassthrough<'a, L>
Source§impl<'de, 'a, L> Deserialize<'de> for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: Deserialize<'de>,
impl<'de, 'a, L> Deserialize<'de> for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<'a, L> Freeze for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: Freeze,
impl<'a, L> RefUnwindSafe for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: RefUnwindSafe,
impl<'a, L> Send for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: Send,
impl<'a, L> Sync for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: Sync,
impl<'a, L> Unpin for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: Unpin,
impl<'a, L> UnwindSafe for CreateShaderModuleDescriptorPassthrough<'a, L>where
L: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)