pub struct ShaderCompiler { /* private fields */ }Expand description
Shader compiler and pipeline builder
Implementations§
Source§impl ShaderCompiler
impl ShaderCompiler
Sourcepub fn compile(
&self,
label: &str,
source: ShaderSource<'_>,
) -> Result<ShaderModule>
pub fn compile( &self, label: &str, source: ShaderSource<'_>, ) -> Result<ShaderModule>
Sourcepub fn create_pipeline(
&self,
label: &str,
shader: &ShaderModule,
entry_point: &str,
bind_group_layout: &BindGroupLayout,
) -> Result<ComputePipeline>
pub fn create_pipeline( &self, label: &str, shader: &ShaderModule, entry_point: &str, bind_group_layout: &BindGroupLayout, ) -> Result<ComputePipeline>
Sourcepub fn create_bind_group_layout(
&self,
label: &str,
entries: &[BindGroupLayoutEntry],
) -> BindGroupLayout
pub fn create_bind_group_layout( &self, label: &str, entries: &[BindGroupLayoutEntry], ) -> BindGroupLayout
Create a bind group layout for compute operations
§Arguments
label- Layout label for debuggingentries- Bind group layout entries
Sourcepub fn create_bind_group(
&self,
label: &str,
layout: &BindGroupLayout,
entries: &[BindGroupEntry<'_>],
) -> BindGroup
pub fn create_bind_group( &self, label: &str, layout: &BindGroupLayout, entries: &[BindGroupEntry<'_>], ) -> BindGroup
Create a bind group
§Arguments
label- Bind group label for debugginglayout- Bind group layoutentries- Bind group entries
Auto Trait Implementations§
impl Freeze for ShaderCompiler
impl !RefUnwindSafe for ShaderCompiler
impl Send for ShaderCompiler
impl Sync for ShaderCompiler
impl Unpin for ShaderCompiler
impl UnsafeUnpin for ShaderCompiler
impl !UnwindSafe for ShaderCompiler
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more