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 BitOr<ShaderStage> for ShaderStages
Adding a stage to a mask that already names others.
impl BitOr<ShaderStage> for ShaderStages
Adding a stage to a mask that already names others.
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 From<ShaderStage> for ShaderStages
Lets a lone stage stand in where a mask is expected, so every
single-stage call site keeps reading as one.
impl From<ShaderStage> for ShaderStages
Lets a lone stage stand in where a mask is expected, so every single-stage call site keeps reading as one.