pub struct WGSLBackend;Expand description
Code generation backend that emits WGSL source text.
Implementations§
Source§impl WGSLBackend
impl WGSLBackend
Sourcepub fn emit_shader(&self, shader: &WGSLShader) -> String
pub fn emit_shader(&self, shader: &WGSLShader) -> String
Emit a complete WGSL module as source text.
Sourcepub fn triangle_shader_template(&self) -> String
pub fn triangle_shader_template(&self) -> String
Build a minimal triangle vertex + fragment shader pair as a single WGSL module.
Sourcepub fn compute_shader_template(&self) -> String
pub fn compute_shader_template(&self) -> String
Build a basic compute shader template for parallel data processing.
Sourcepub fn texture_sample_template(&self) -> String
pub fn texture_sample_template(&self) -> String
Build a texture sampling shader template.
Sourcepub fn reduction_shader_template(&self, workgroup_size: u32) -> String
pub fn reduction_shader_template(&self, workgroup_size: u32) -> String
Build a workgroup-shared-memory reduction compute shader.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WGSLBackend
impl RefUnwindSafe for WGSLBackend
impl Send for WGSLBackend
impl Sync for WGSLBackend
impl Unpin for WGSLBackend
impl UnsafeUnpin for WGSLBackend
impl UnwindSafe for WGSLBackend
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