Function validate_texture_copy_range

Source
pub(crate) fn validate_texture_copy_range<T>(
    texture_copy_view: &TexelCopyTextureInfo<T>,
    desc: &TextureDescriptor<(), Vec<TextureFormat>>,
    texture_side: CopySide,
    copy_size: &Extent3d,
) -> Result<(CopyExtent, u32), TransferError>
Expand description

Validate the extent and alignment of a texture copy.

Copied with minor modifications from WebGPU standard. This mostly follows the validating GPUTexelCopyTextureInfo and validating texture copy range algorithms.

Returns the HAL copy extent and the layer count.