Skip to content

Commit

Permalink
fix: remove 0-dimension check for transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Mar 28, 2024
1 parent b34219c commit a3a24d9
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions wgpu-core/src/command/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,6 @@ impl Global {
.into());
}

if size == 0 {
log::trace!("Ignoring copy_buffer_to_buffer of size 0");
return Ok(());
}

// Make sure source is initialized memory and mark dest as initialized.
cmd_buf_data.buffer_memory_init_actions.extend(
dst_buffer.initialization_status.read().create_action(
Expand Down Expand Up @@ -767,11 +762,6 @@ impl Global {
let buffer_memory_init_actions = &mut cmd_buf_data.buffer_memory_init_actions;
let texture_memory_actions = &mut cmd_buf_data.texture_memory_actions;

if copy_size.width == 0 || copy_size.height == 0 || copy_size.depth_or_array_layers == 0 {
log::trace!("Ignoring copy_buffer_to_texture of size 0");
return Ok(());
}

let dst_texture = hub
.textures
.get(destination.texture)
Expand Down Expand Up @@ -928,11 +918,6 @@ impl Global {
let buffer_memory_init_actions = &mut cmd_buf_data.buffer_memory_init_actions;
let texture_memory_actions = &mut cmd_buf_data.texture_memory_actions;

if copy_size.width == 0 || copy_size.height == 0 || copy_size.depth_or_array_layers == 0 {
log::trace!("Ignoring copy_texture_to_buffer of size 0");
return Ok(());
}

let src_texture = hub
.textures
.get(source.texture)
Expand Down Expand Up @@ -1103,11 +1088,6 @@ impl Global {
let tracker = &mut cmd_buf_data.trackers;
let texture_memory_actions = &mut cmd_buf_data.texture_memory_actions;

if copy_size.width == 0 || copy_size.height == 0 || copy_size.depth_or_array_layers == 0 {
log::trace!("Ignoring copy_texture_to_texture of size 0");
return Ok(());
}

let src_texture = hub
.textures
.get(source.texture)
Expand Down

0 comments on commit a3a24d9

Please sign in to comment.