pub struct SurfaceKey {
pub color_format: TextureFormat,
pub depth_stencil_format: Option<TextureFormat>,
pub sample_count: u32,
}Expand description
The render target a pipeline is specialized for.
Width and height are excluded: a pipeline does not depend on the size of the target it draws into.
Fields§
§color_format: TextureFormatThe format of the color attachment.
depth_stencil_format: Option<TextureFormat>The format of the depth-stencil attachment, if the pass has one.
sample_count: u32The sample count the pass renders with.
Implementations§
Source§impl SurfaceKey
impl SurfaceKey
Sourcepub fn from_attachments(attachments: &RenderAttachments) -> Self
pub fn from_attachments(attachments: &RenderAttachments) -> Self
The surface a set of attachments describes.
The color format and sample count are read from the same attachment path, so they stay consistent: the MSAA view when one is set, the color view otherwise. A depth-only attachment set has no color view, so its key reports Rgba8UnormSrgb as the color format; a depth-only pipeline is the caller’s to build.
Trait Implementations§
Source§impl Clone for SurfaceKey
impl Clone for SurfaceKey
impl Copy for SurfaceKey
Source§impl Debug for SurfaceKey
impl Debug for SurfaceKey
impl Eq for SurfaceKey
Source§impl Hash for SurfaceKey
impl Hash for SurfaceKey
Source§impl PartialEq for SurfaceKey
impl PartialEq for SurfaceKey
impl StructuralPartialEq for SurfaceKey
Auto Trait Implementations§
impl Forget for SurfaceKey
impl Freeze for SurfaceKey
impl RefUnwindSafe for SurfaceKey
impl Send for SurfaceKey
impl Sync for SurfaceKey
impl Unpin for SurfaceKey
impl UnsafeUnpin for SurfaceKey
impl UnwindSafe for SurfaceKey
Blanket Implementations§
impl<T> AsId for T
impl<T> AsIdSalt for T
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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> ⓘ
Converts
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> ⓘ
Converts
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