Skip to content

Commit 07caf59

Browse files
teoxoyEriKWDev
authored andcommitted
remove old depth and/or stencil texture copy validation
This was previously added in gfx-rs#2230 but I don't think it was necessary. gfx-rs#901 already implemented the buffer <-> texture validation for those formats. It's also not a requirement in the spec.
1 parent 747ee6c commit 07caf59

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

wgpu-core/src/command/transfer.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ pub enum TransferError {
125125
"Copying to textures with format {0:?} is forbidden when copying from external texture"
126126
)]
127127
ExternalCopyToForbiddenTextureFormat(wgt::TextureFormat),
128-
#[error("The entire texture must be copied when copying from depth texture")]
129-
InvalidDepthTextureExtent,
130128
#[error(
131129
"Source format ({src_format:?}) and destination format ({dst_format:?}) are not copy-compatible (they may only differ in srgb-ness)"
132130
)]
@@ -367,10 +365,6 @@ pub(crate) fn validate_texture_copy_range(
367365
// physical size can be larger than the virtual
368366
let extent = extent_virtual.physical_size(desc.format);
369367

370-
if desc.format.is_depth_stencil_format() && *copy_size != extent {
371-
return Err(TransferError::InvalidDepthTextureExtent);
372-
}
373-
374368
/// Return `Ok` if a run `size` texels long starting at `start_offset` falls
375369
/// entirely within `texture_size`. Otherwise, return an appropriate a`Err`.
376370
fn check_dimension(

0 commit comments

Comments
 (0)