Function wgpu_core::command::transfer::validate_linear_texture_data
source · pub(crate) fn validate_linear_texture_data(
layout: &ImageDataLayout,
format: TextureFormat,
aspect: TextureAspect,
buffer_size: BufferAddress,
buffer_side: CopySide,
copy_size: &Extent3d,
need_copy_aligned_rows: bool,
) -> Result<(BufferAddress, BufferAddress), TransferError>
Expand description
WebGPU’s validating linear texture data algorithm.
Copied with some modifications from WebGPU standard.
If successful, returns a pair (bytes, stride)
, where:
bytes
is the number of buffer bytes required for this copy, andstride
number of bytes between array layers.