wgpu_types::transfers

Struct BufferTextureCopyInfo

Source
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,
}
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§

Source§

impl Clone for BufferTextureCopyInfo

Source§

fn clone(&self) -> BufferTextureCopyInfo

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BufferTextureCopyInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for BufferTextureCopyInfo

Source§

fn eq(&self, other: &BufferTextureCopyInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for BufferTextureCopyInfo

Source§

impl Eq for BufferTextureCopyInfo

Source§

impl StructuralPartialEq for BufferTextureCopyInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,