remove old depth and/or stencil texture copy validation

This was previously added in #2230 but I don't think it was necessary. #901 already implemented the buffer <-> texture validation for those formats. It's also not a requirement in the spec.
This commit is contained in:
Teodor Tanasoaia 2024-05-14 12:03:44 +02:00
parent 77a83fb0dd
commit 3a798859cd

View File

@ -125,8 +125,6 @@ pub enum TransferError {
"Copying to textures with format {0:?} is forbidden when copying from external texture"
)]
ExternalCopyToForbiddenTextureFormat(wgt::TextureFormat),
#[error("The entire texture must be copied when copying from depth texture")]
InvalidDepthTextureExtent,
#[error(
"Source format ({src_format:?}) and destination format ({dst_format:?}) are not copy-compatible (they may only differ in srgb-ness)"
)]
@ -367,10 +365,6 @@ pub(crate) fn validate_texture_copy_range(
// physical size can be larger than the virtual
let extent = extent_virtual.physical_size(desc.format);
if desc.format.is_depth_stencil_format() && *copy_size != extent {
return Err(TransferError::InvalidDepthTextureExtent);
}
/// Return `Ok` if a run `size` texels long starting at `start_offset` falls
/// entirely within `texture_size`. Otherwise, return an appropriate a`Err`.
fn check_dimension(