pub enum ShaderStage {
Vertex,
Fragment,
Compute,
}Expand description
The shader stages a bind group layout entry is visible to.
The wire field is a bitmask, so entries are usually visible to more
than one stage; the renderer ORs the selected variants together at the
call site. This replaces the raw visibility: u32 on
BindGroupLayoutEntry, where 0x1 / 0x2 / 0x4 were written by
hand and a wrong bit silently produced a binding the shader cannot see.
Variants§
Vertex
The vertex stage, mask value 0x1.
Fragment
The fragment stage, mask value 0x2.
Compute
The compute stage, mask value 0x4.
Implementations§
Trait Implementations§
Source§impl BitOr for ShaderStage
Combines two shader stages into the visibility bitmask a bind group
layout entry expects.
impl BitOr for ShaderStage
Combines two shader stages into the visibility bitmask a bind group layout entry expects.
The third of the three bitmask-carrying WebGPU enums; see
BufferUsage for why combining is expressed as an operator rather
than a helper call.
Source§impl Clone for ShaderStage
impl Clone for ShaderStage
impl Copy for ShaderStage
Source§impl Debug for ShaderStage
impl Debug for ShaderStage
impl Eq for ShaderStage
Source§impl Hash for ShaderStage
impl Hash for ShaderStage
Source§impl PartialEq for ShaderStage
impl PartialEq for ShaderStage
impl StructuralPartialEq for ShaderStage
Auto Trait Implementations§
impl Freeze for ShaderStage
impl RefUnwindSafe for ShaderStage
impl Send for ShaderStage
impl Sync for ShaderStage
impl Unpin for ShaderStage
impl UnsafeUnpin for ShaderStage
impl UnwindSafe for ShaderStage
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