pub struct RenderPipelineDesc {
pub label: Option<String>,
pub layout: Option<PipelineLayout>,
pub vertex: VertexStateDesc,
pub primitive: PrimitiveState,
pub depth_stencil: Option<DepthStencilState>,
pub multisample: MultisampleState,
pub fragment: Option<FragmentStateDesc>,
pub multiview_mask: Option<NonZeroU32>,
pub cache: Option<PipelineCache>,
}Expand description
An owned mirror of wgpu’s render-pipeline descriptor, with every borrowed slice owned so it can outlive the descriptor it was read from.
A specializer rewrites these fields in place, and a SpecializedPipeline stores the result alongside the pipeline it compiles into.
Fields§
§label: Option<String>Debug label of the pipeline.
layout: Option<PipelineLayout>The bind group layouts this pipeline uses.
vertex: VertexStateDescThe vertex stage.
primitive: PrimitiveStatePrimitive assembly and rasterization state.
depth_stencil: Option<DepthStencilState>Depth-stencil state, if the pass has a depth attachment.
multisample: MultisampleStateMultisampling state.
fragment: Option<FragmentStateDesc>The fragment stage, if the pipeline writes color.
multiview_mask: Option<NonZeroU32>The multiview mask, if the pipeline renders with multiview.
cache: Option<PipelineCache>The pipeline cache to compile against.
Implementations§
Trait Implementations§
Source§impl Clone for RenderPipelineDesc
impl Clone for RenderPipelineDesc
Source§impl Debug for RenderPipelineDesc
impl Debug for RenderPipelineDesc
Source§impl PartialEq for RenderPipelineDesc
impl PartialEq for RenderPipelineDesc
Source§impl PipelineDescriptor<RenderPipeline> for RenderPipelineDesc
impl PipelineDescriptor<RenderPipeline> for RenderPipelineDesc
impl StructuralPartialEq for RenderPipelineDesc
Source§impl SurfaceTarget for RenderPipelineDesc
impl SurfaceTarget for RenderPipelineDesc
Source§fn set_surface(&mut self, surface: SurfaceKey)
fn set_surface(&mut self, surface: SurfaceKey)
The color format and sample count reach every fragment target, and the depth format the depth-stencil state.
A target with no depth attachment yields a descriptor with no depth
state: wgpu rejects a pipeline that declares one against a pass that
has none, so the state follows the target rather than keeping a stale
format. A target that has one keeps whatever state the descriptor
carried — the comparison, the write mask — and only takes the format.
Auto Trait Implementations§
impl !RefUnwindSafe for RenderPipelineDesc
impl !UnwindSafe for RenderPipelineDesc
impl Forget for RenderPipelineDesc
impl Freeze for RenderPipelineDesc
impl Send for RenderPipelineDesc
impl Sync for RenderPipelineDesc
impl Unpin for RenderPipelineDesc
impl UnsafeUnpin for RenderPipelineDesc
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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> ⓘ
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> ⓘ
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