Skip to main content

validate_texture_copy_dst_format

Function validate_texture_copy_dst_format 

Source
pub(crate) fn validate_texture_copy_dst_format(
    format: TextureFormat,
    aspect: TextureAspect,
) -> Result<(), TransferError>
Expand description

Validate the destination format of a buffer-to-texture copy.

This performs the check from WebGPU’s validating texture buffer copy algorithm that ensures that the format and aspect form a valid texel copy destination as defined in the depth-stencil formats. This check differs depending on whether the copy is buffer-to-texture or texture-to-buffer. Other checks that do not differ by direction are implemented in validate_texture_buffer_copy.