pub enum EnginePipeline {
StripIntermediate,
StripAlpha,
StripDepthAlpha,
StripOpaque,
StripDestOut,
StripDepthDestOut,
Clear,
Copy,
Filter,
}Expand description
One of the engine’s render pipelines.
Variants§
StripIntermediate
Strips into an INTERMEDIATE_FORMAT off-screen target.
StripAlpha
Strips into the frame’s own target, alpha-blended, no depth.
StripDepthAlpha
Strips into the frame’s own target, alpha-blended, depth-tested but not depth-writing.
StripOpaque
Strips into the frame’s own target, opaque, depth-tested and depth-writing.
StripDestOut
Hole-punch coverage into the frame’s own target, destination-out, no depth.
StripDepthDestOut
Hole-punch coverage into the frame’s own target, destination-out, depth-tested but not depth-writing.
Clear
Clears rectangular regions of an intermediate target.
Copy
Copies rectangular regions between intermediate targets.
Filter
Runs one pass of a layer filter’s sequence into an intermediate target, reading the other page of the pair through a bilinear sampler.
Implementations§
Source§impl EnginePipeline
impl EnginePipeline
Sourcepub const fn is_strip(self) -> bool
pub const fn is_strip(self) -> bool
Whether this pipeline rasterizes strips (as opposed to clearing or copying an intermediate).
Sourcepub const fn bind_group_count(self) -> usize
pub const fn bind_group_count(self) -> usize
How many bind groups the pipeline’s program declares.
Four is the WebGL2 ceiling, which the strip programs sit exactly on.
Sourcepub const fn format(self, target_format: TextureFormat) -> TextureFormat
pub const fn format(self, target_format: TextureFormat) -> TextureFormat
The color format this pipeline writes, given the frame’s target format.
Only the variants that draw into the frame’s own target take it; the
rest are pinned to INTERMEDIATE_FORMAT.
Sourcepub const fn blend(self) -> Option<BlendState>
pub const fn blend(self) -> Option<BlendState>
The color blending this pipeline uses, or None for an opaque write.
Sourcepub fn depth(self) -> Option<DepthStencilState>
pub fn depth(self) -> Option<DepthStencilState>
The depth state this pipeline uses, or None for a color-only pass.
Sourcepub fn vertex_layouts(self) -> Vec<VertexLayout>
pub fn vertex_layouts(self) -> Vec<VertexLayout>
The vertex buffer layouts this pipeline steps over.
Sourcepub const fn module(self) -> EngineShaderModule
pub const fn module(self) -> EngineShaderModule
Which module this pipeline draws with.
Sourcepub const fn shader(self, shaders: &EngineShaders) -> ShaderId
pub const fn shader(self, shaders: &EngineShaders) -> ShaderId
The registered id of the module this pipeline draws with.
Sourcepub fn desc(
self,
shaders: &EngineShaders,
target_format: TextureFormat,
) -> RenderPipelineDesc
pub fn desc( self, shaders: &EngineShaders, target_format: TextureFormat, ) -> RenderPipelineDesc
The full pipeline description, ready for
PipelineCache::get_or_create or PipelineCache::warm_up.
sample_count is always 1: the engine never multisamples, since a
downlevel target cannot.
Sourcepub fn layout_desc(self) -> PipelineLayoutDesc
pub fn layout_desc(self) -> PipelineLayoutDesc
This pipeline’s shape as the downlevel lint reads it, so the
bind-group, vertex-topology and sample-count ceilings
(frust_gpu::lint::lint_pipeline_layout) are checked against the real
descriptions rather than restated by hand.
Trait Implementations§
Source§impl Clone for EnginePipeline
impl Clone for EnginePipeline
impl Copy for EnginePipeline
Source§impl Debug for EnginePipeline
impl Debug for EnginePipeline
impl Eq for EnginePipeline
Source§impl Hash for EnginePipeline
impl Hash for EnginePipeline
Source§impl PartialEq for EnginePipeline
impl PartialEq for EnginePipeline
impl StructuralPartialEq for EnginePipeline
Auto Trait Implementations§
impl Freeze for EnginePipeline
impl RefUnwindSafe for EnginePipeline
impl Send for EnginePipeline
impl Sync for EnginePipeline
impl Unpin for EnginePipeline
impl UnsafeUnpin for EnginePipeline
impl UnwindSafe for EnginePipeline
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.