Skip to content

Commit

Permalink
remove old depth and/or stencil texture copy validation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
teoxoy committed May 15, 2024
1 parent 77a83fb commit 3a79885
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions wgpu-core/src/command/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
)]
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 3a79885

Please sign in to comment.