From 6adaef6512f29ab50998a194f499100e8ecc853c Mon Sep 17 00:00:00 2001 From: Vengarioth | Andreas Fischer Date: Mon, 18 Jan 2021 18:46:37 +0100 Subject: [PATCH] fix the size checks in transfer buffer to image commands --- wgpu-core/src/command/transfer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wgpu-core/src/command/transfer.rs b/wgpu-core/src/command/transfer.rs index 7232c302d2..a226c9ef15 100644 --- a/wgpu-core/src/command/transfer.rs +++ b/wgpu-core/src/command/transfer.rs @@ -443,7 +443,7 @@ impl Global { }); } - if copy_size.width == 0 || copy_size.height == 0 || copy_size.width == 0 { + if copy_size.width == 0 || copy_size.height == 0 || copy_size.depth == 0 { tracing::trace!("Ignoring copy_buffer_to_texture of size 0"); return Ok(()); } @@ -583,7 +583,7 @@ impl Global { }); } - if copy_size.width == 0 || copy_size.height == 0 || copy_size.width == 0 { + if copy_size.width == 0 || copy_size.height == 0 || copy_size.depth == 0 { tracing::trace!("Ignoring copy_texture_to_buffer of size 0"); return Ok(()); } @@ -733,7 +733,7 @@ impl Global { }); } - if copy_size.width == 0 || copy_size.height == 0 || copy_size.width == 0 { + if copy_size.width == 0 || copy_size.height == 0 || copy_size.depth == 0 { tracing::trace!("Ignoring copy_texture_to_texture of size 0"); return Ok(()); }