pub struct ShaderModule {
pub(crate) inner: DispatchShaderModule,
}
Expand description
Handle to a compiled shader module.
A ShaderModule
represents a compiled shader module on the GPU. It can be created by passing
source code to Device::create_shader_module
or valid SPIR-V binary to
Device::create_shader_module_spirv
. Shader modules are used to define programmable stages
of a pipeline.
Corresponds to WebGPU GPUShaderModule
.
Fields§
§inner: DispatchShaderModule
Implementations§
source§impl ShaderModule
impl ShaderModule
sourcepub fn get_compilation_info(
&self,
) -> impl Future<Output = CompilationInfo> + WasmNotSend
pub fn get_compilation_info( &self, ) -> impl Future<Output = CompilationInfo> + WasmNotSend
Get the compilation info for the shader module.
Trait Implementations§
source§impl Clone for ShaderModule
impl Clone for ShaderModule
source§fn clone(&self) -> ShaderModule
fn clone(&self) -> ShaderModule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ShaderModule
impl Debug for ShaderModule
source§impl Hash for ShaderModule
impl Hash for ShaderModule
source§impl Ord for ShaderModule
impl Ord for ShaderModule
source§impl PartialEq for ShaderModule
impl PartialEq for ShaderModule
source§impl PartialOrd for ShaderModule
impl PartialOrd for ShaderModule
impl Eq for ShaderModule
Auto Trait Implementations§
impl Freeze for ShaderModule
impl !RefUnwindSafe for ShaderModule
impl Send for ShaderModule
impl Sync for ShaderModule
impl Unpin for ShaderModule
impl !UnwindSafe for ShaderModule
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.