Struct BufferTextureCopyInfo
pub struct BufferTextureCopyInfo {Show 16 fields
pub copy_width: u64,
pub copy_height: u64,
pub depth_or_array_layers: u64,
pub offset: u64,
pub block_size_bytes: u64,
pub block_width_texels: u64,
pub block_height_texels: u64,
pub width_blocks: u64,
pub height_blocks: u64,
pub row_bytes_dense: u64,
pub row_stride_bytes: u64,
pub image_stride_rows: u64,
pub image_stride_bytes: u64,
pub image_rows_dense: u64,
pub image_bytes_dense: u64,
pub bytes_in_copy: u64,
}
unstable-wgpu-26
only.Expand description
Information about a copy between a buffer and a texture.
Mostly used for internal calculations, but useful nonetheless.
Generated by TexelCopyBufferLayout::get_buffer_texture_copy_info
.
Fields§
§copy_width: u64
The width of the copy region in pixels.
copy_height: u64
The height of the copy region in pixels.
depth_or_array_layers: u64
The depth of the copy region in pixels.
offset: u64
The offset in the buffer where the copy starts.
block_size_bytes: u64
The size of a single texture texel block in bytes.
block_width_texels: u64
The number of texel in a texel block in the x direction.
block_height_texels: u64
The number of texel in a texel block in the y direction.
width_blocks: u64
The width of the copy region in blocks.
height_blocks: u64
The height of the copy region in blocks.
row_bytes_dense: u64
The number of bytes in the last row of the copy region.
row_stride_bytes: u64
The stride in bytes between the start of one row in an image and the next row in the same image.
This includes any padding between one row and the next row.
image_stride_rows: u64
The stride in rows between the start of one image and the next image.
image_stride_bytes: u64
The stride in bytes between the start of one image and the next image.
image_rows_dense: u64
The number of rows in a densely packed list of images.
This is the number of rows in the image that are actually used for texel data,
and does not include any padding rows, unlike image_stride_rows
.
image_bytes_dense: u64
The number of bytes in a densely packed list of images.
This is the number of bytes in the image that are actually used for texel data, or are used for padding between rows. Padding at the end of the last row and between images is not included.
bytes_in_copy: u64
The total number of bytes in the copy region.
This includes all padding except the padding after the last row in the copy.
Trait Implementations§
§impl Clone for BufferTextureCopyInfo
impl Clone for BufferTextureCopyInfo
§fn clone(&self) -> BufferTextureCopyInfo
fn clone(&self) -> BufferTextureCopyInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for BufferTextureCopyInfo
impl Debug for BufferTextureCopyInfo
§impl PartialEq for BufferTextureCopyInfo
impl PartialEq for BufferTextureCopyInfo
impl Copy for BufferTextureCopyInfo
impl Eq for BufferTextureCopyInfo
impl StructuralPartialEq for BufferTextureCopyInfo
Auto Trait Implementations§
impl Freeze for BufferTextureCopyInfo
impl RefUnwindSafe for BufferTextureCopyInfo
impl Send for BufferTextureCopyInfo
impl Sync for BufferTextureCopyInfo
impl Unpin for BufferTextureCopyInfo
impl UnwindSafe for BufferTextureCopyInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.