pub(crate) fn validate_linear_texture_data(
layout: &TexelCopyBufferLayout,
format: TextureFormat,
aspect: TextureAspect,
buffer_size: BufferAddress,
buffer_side: CopySide,
copy_size: &Extent3d,
) -> Result<(BufferAddress, BufferAddress, bool), TransferError>Expand description
WebGPU’s validating linear texture data algorithm.
Copied with some modifications from WebGPU standard.
If successful, returns a tuple (bytes, stride, is_contiguous), where:
bytesis the number of buffer bytes required for this copy, andstridenumber of bytes between array layers.is_contiguousis true if the linear texture data does not have padding between rows or between images.