Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
gents83 committed Oct 1, 2023
1 parent b2d5462 commit d4a8689
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 132 deletions.
2 changes: 1 addition & 1 deletion wgpu-core/src/command/clear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {

let device = &cmd_buf.device;
if !device.is_valid() {
return Err(ClearError::InvalidDevice(cmd_buf.device_id.value.0));
return Err(ClearError::InvalidDevice(cmd_buf.device.as_info().id()));
}
let (encoder, tracker) = cmd_buf_data.open_encoder_and_tracker();

Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/command/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let device = &cmd_buf.device;
if !device.is_valid() {
return Err(ComputePassErrorInner::InvalidDevice(
cmd_buf.device_id.value.0,
cmd_buf.device.as_info().id(),
))
.map_pass_err(init_scope);
}

let mut cmd_buf_data = cmd_buf.data.lock();
let cmd_buf_data = cmd_buf_data.as_mut().unwrap();

Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/command/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,11 +1307,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
occlusion_query_set_id,
});
}

let device = &cmd_buf.device;
if !device.is_valid() {
return Err(RenderPassErrorInner::InvalidDevice(
cmd_buf.device_id.value.0,
cmd_buf.device.as_info().id(),
))
.map_pass_err(init_scope);
}
Expand Down
20 changes: 9 additions & 11 deletions wgpu-core/src/command/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ use crate::{
error::{ErrorFormatter, PrettyError},
global::Global,
hal_api::HalApi,
id::{BufferId, CommandEncoderId, DeviceId, TextureId, Valid},
id::{BufferId, CommandEncoderId, DeviceId, TextureId},
identity::GlobalIdentityHandlerFactory,
init_tracker::{
has_copy_partial_init_tracker_coverage, MemoryInitKind, TextureInitRange,
TextureInitTrackerAction,
},
resource::{Texture, TextureErrorDimension},
resource::{Resource, Texture, TextureErrorDimension},
storage::Storage,
track::{TextureSelector, Tracker},
};
Expand Down Expand Up @@ -579,7 +579,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {

let device = &cmd_buf.device;
if !device.is_valid() {
return Err(TransferError::InvalidDevice(cmd_buf.device_id.value.0).into());
return Err(TransferError::InvalidDevice(cmd_buf.device.as_info().id()).into());
}

#[cfg(feature = "trace")]
Expand Down Expand Up @@ -733,9 +733,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let cmd_buf = CommandBuffer::get_encoder(hub, command_encoder_id)?;
let device = &cmd_buf.device;
if !device.is_valid() {
return Err(TransferError::InvalidDevice(cmd_buf.device_id.value.0).into());
return Err(TransferError::InvalidDevice(cmd_buf.device.as_info().id()).into());
}

let mut cmd_buf_data = cmd_buf.data.lock();
let cmd_buf_data = cmd_buf_data.as_mut().unwrap();

Expand Down Expand Up @@ -891,9 +891,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let cmd_buf = CommandBuffer::get_encoder(hub, command_encoder_id)?;
let device = &cmd_buf.device;
if !device.is_valid() {
return Err(TransferError::InvalidDevice(cmd_buf.device_id.value.0).into());
return Err(TransferError::InvalidDevice(cmd_buf.device.as_info().id()).into());
}

let mut cmd_buf_data = cmd_buf.data.lock();
let cmd_buf_data = cmd_buf_data.as_mut().unwrap();

Expand All @@ -912,7 +912,6 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {

let texture_guard = hub.textures.read();


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(());
Expand Down Expand Up @@ -1062,9 +1061,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let cmd_buf = CommandBuffer::get_encoder(hub, command_encoder_id)?;
let device = &cmd_buf.device;
if !device.is_valid() {
return Err(TransferError::InvalidDevice(cmd_buf.device_id.value.0).into());
return Err(TransferError::InvalidDevice(cmd_buf.device.as_info().id()).into());
}

let mut cmd_buf_data = cmd_buf.data.lock();
let cmd_buf_data = cmd_buf_data.as_mut().unwrap();

Expand All @@ -1082,7 +1081,6 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {

let texture_guard = hub.textures.read();


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(());
Expand Down
Loading

0 comments on commit d4a8689

Please sign in to comment.