mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
fix: remove 0-dimension check for transfers
This commit is contained in:
parent
ea75a8ced4
commit
3cbdc716e8
@ -634,11 +634,6 @@ impl Global {
|
|||||||
.into());
|
.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.
|
// Make sure source is initialized memory and mark dest as initialized.
|
||||||
cmd_buf_data.buffer_memory_init_actions.extend(
|
cmd_buf_data.buffer_memory_init_actions.extend(
|
||||||
dst_buffer.initialization_status.read().create_action(
|
dst_buffer.initialization_status.read().create_action(
|
||||||
@ -706,11 +701,6 @@ impl Global {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
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).get()?;
|
let dst_texture = hub.textures.get(destination.texture).get()?;
|
||||||
|
|
||||||
dst_texture.same_device_as(cmd_buf.as_ref())?;
|
dst_texture.same_device_as(cmd_buf.as_ref())?;
|
||||||
@ -859,11 +849,6 @@ impl Global {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
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).get()?;
|
let src_texture = hub.textures.get(source.texture).get()?;
|
||||||
|
|
||||||
src_texture.same_device_as(cmd_buf.as_ref())?;
|
src_texture.same_device_as(cmd_buf.as_ref())?;
|
||||||
@ -1028,11 +1013,6 @@ impl Global {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
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).get()?;
|
let src_texture = hub.textures.get(source.texture).get()?;
|
||||||
let dst_texture = hub.textures.get(destination.texture).get()?;
|
let dst_texture = hub.textures.get(destination.texture).get()?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user