pub struct MsaaTarget {
pub texture: Texture,
pub view: TextureView,
pub sample_count: u32,
pub format: TextureFormat,
pub size: Extent3d,
}Expand description
A multisampled color attachment.
Hosts allocate one of these to match their resolve target’s extent
and pass Self::view as the render pass view while binding
their resolve target as resolve_target. On window resize, check
Self::matches and reallocate when it returns false.
Fields§
§texture: Texture§view: TextureView§sample_count: u32§format: TextureFormat§size: Extent3dImplementations§
Source§impl MsaaTarget
impl MsaaTarget
Sourcepub fn new(
device: &Device,
format: TextureFormat,
size: Extent3d,
sample_count: u32,
) -> Self
pub fn new( device: &Device, format: TextureFormat, size: Extent3d, sample_count: u32, ) -> Self
Build a fresh multisampled color attachment sized to size.
Usage is RENDER_ATTACHMENT only — multisampled textures cannot
be sampled or copied directly; the resolve target is what the
host reads back, presents, or samples.
Auto Trait Implementations§
impl Freeze for MsaaTarget
impl !RefUnwindSafe for MsaaTarget
impl Send for MsaaTarget
impl Sync for MsaaTarget
impl Unpin for MsaaTarget
impl UnsafeUnpin for MsaaTarget
impl !UnwindSafe for MsaaTarget
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.