Skip to main content

validate_texture_copy_range

Function validate_texture_copy_range 

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

Validate the extent and alignment of a texture copy.

Mostly follows the validating GPUTexelCopyTextureInfo and validating texture copy range algorithms in the WebGPU standard, with some modifications for wgpu extensions.

Returns a validated CopyRange.