pub struct PoolKey {
pub width: u32,
pub height: u32,
pub format: TextureFormat,
pub usage: TextureUsages,
pub sample_count: u32,
}Expand description
The configuration a pooled texture is interchangeable within: two requests that produce the same key may share one texture, and two that do not never can.
width/height are the quantized extent (quantize_extent), and
usage is the effective usage (effective_usage) rather than the
requested one, because those are what the pooled texture was actually
created with.
Fields§
§width: u32Quantized width in texels.
height: u32Quantized height in texels.
format: TextureFormatThe texture’s pixel format.
usage: TextureUsagesThe usage the texture was created with.
sample_count: u32The texture’s sample count. Always 1 today (TextureDesc exposes
no way to ask for more), and part of the key anyway so a multisampled
target could never alias a single-sampled one.
Trait Implementations§
impl Copy for PoolKey
impl Eq for PoolKey
impl StructuralPartialEq for PoolKey
Auto Trait Implementations§
impl Freeze for PoolKey
impl RefUnwindSafe for PoolKey
impl Send for PoolKey
impl Sync for PoolKey
impl Unpin for PoolKey
impl UnsafeUnpin for PoolKey
impl UnwindSafe for PoolKey
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
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
Compare self to
key and return true if they are equal.