Struct vulkano::image::SubresourceLayout
source · pub struct SubresourceLayout {
pub offset: DeviceSize,
pub size: DeviceSize,
pub row_pitch: DeviceSize,
pub array_pitch: Option<DeviceSize>,
pub depth_pitch: Option<DeviceSize>,
}
Expand description
Describes the memory layout of a single subresource of an image.
The address of a texel at (x, y, z, layer)
is layer * array_pitch + z * depth_pitch + y * row_pitch + x * size_of_each_texel + offset
. size_of_each_texel
must be determined
depending on the format. The same formula applies for compressed formats, except that the
coordinates must be in number of blocks.
Fields§
§offset: DeviceSize
The number of bytes from the start of the memory to the start of the queried subresource.
size: DeviceSize
The total number of bytes for the queried subresource.
row_pitch: DeviceSize
The number of bytes between two texels or two blocks in adjacent rows.
array_pitch: Option<DeviceSize>
For images with more than one array layer, the number of bytes between two texels or two blocks in adjacent array layers.
depth_pitch: Option<DeviceSize>
For 3D images, the number of bytes between two texels or two blocks in adjacent depth layers.
Trait Implementations§
source§impl Clone for SubresourceLayout
impl Clone for SubresourceLayout
source§fn clone(&self) -> SubresourceLayout
fn clone(&self) -> SubresourceLayout
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SubresourceLayout
impl Debug for SubresourceLayout
source§impl PartialEq for SubresourceLayout
impl PartialEq for SubresourceLayout
source§fn eq(&self, other: &SubresourceLayout) -> bool
fn eq(&self, other: &SubresourceLayout) -> bool
self
and other
values to be equal, and is used
by ==
.