Struct CreateShaderModuleDescriptorPassthrough

Source
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: String

Entrypoint. Unused for Spir-V.

§label: L

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.

Implementations§

Source§

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

Source

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.

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> Clone for CreateShaderModuleDescriptorPassthrough<'a, L>

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> Debug for CreateShaderModuleDescriptorPassthrough<'a, L>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a, L: Default> Default for CreateShaderModuleDescriptorPassthrough<'a, L>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

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>,

Deserialize this value from the given Serde deserializer. Read more
Source§

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

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,