Struct re_renderer::wgpu_resources::texture_pool::TextureDesc
source · pub struct TextureDesc {
pub label: DebugLabel,
pub size: Extent3d,
pub mip_level_count: u32,
pub sample_count: u32,
pub dimension: TextureDimension,
pub format: TextureFormat,
pub usage: TextureUsages,
}
Fields§
§label: DebugLabel
Debug label of the texture. This will show up in graphics debuggers for easy identification.
size: Extent3d
Size of the texture. All components must be greater than zero. For a regular 1D/2D texture, the unused sizes will be 1. For 2DArray textures, Z is the number of 2D textures in that array.
mip_level_count: u32
Mip count of texture. For a texture with no extra mips, this must be 1.
sample_count: u32
Sample count of texture. If this is not 1, texture must have [wgpu::BindingType::Texture::multisampled
] set to true.
dimension: TextureDimension
Dimensions of the texture.
format: TextureFormat
Format of the texture.
usage: TextureUsages
Allowed usages of the texture. If used in other ways, the operation will panic.
Implementations§
source§impl TextureDesc
impl TextureDesc
sourcepub fn with_label(&self, label: DebugLabel) -> Self
pub fn with_label(&self, label: DebugLabel) -> Self
Copies the desc but changes the label.
sourcepub fn with_label_push(&self, append_this: &str) -> Self
pub fn with_label_push(&self, append_this: &str) -> Self
Copies the desc but adds a string to the label.
Trait Implementations§
source§impl Clone for TextureDesc
impl Clone for TextureDesc
source§fn clone(&self) -> TextureDesc
fn clone(&self) -> TextureDesc
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TextureDesc
impl Debug for TextureDesc
source§impl DynamicResourcesDesc for TextureDesc
impl DynamicResourcesDesc for TextureDesc
source§fn resource_size_in_bytes(&self) -> u64
fn resource_size_in_bytes(&self) -> u64
Number of bytes this texture is expected to take.
The actual number might be both bigger (padding) and lower (gpu sided compression).
source§fn allow_reuse(&self) -> bool
fn allow_reuse(&self) -> bool
DynamicResourcePool::begin_frame
.source§impl Hash for TextureDesc
impl Hash for TextureDesc
source§impl PartialEq for TextureDesc
impl PartialEq for TextureDesc
source§fn eq(&self, other: &TextureDesc) -> bool
fn eq(&self, other: &TextureDesc) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for TextureDesc
impl StructuralPartialEq for TextureDesc
Auto Trait Implementations§
impl Freeze for TextureDesc
impl RefUnwindSafe for TextureDesc
impl Send for TextureDesc
impl Sync for TextureDesc
impl Unpin for TextureDesc
impl UnwindSafe for TextureDesc
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
key
and return true
if they are equal.§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
§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