Skip to content

Commit

Permalink
Missing method refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp committed Jul 23, 2021
1 parent 7a59438 commit 4b37b28
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl<A: HalApi> Adapter<A> {
}
}

fn device_from_open(
fn create_device_from_hal(
&self,
self_id: AdapterId,
open: hal::OpenDevice<A>,
Expand Down Expand Up @@ -326,7 +326,7 @@ impl<A: HalApi> Adapter<A> {
hal::DeviceError::OutOfMemory => RequestDeviceError::OutOfMemory,
})?;

self.device_from_open(self_id, open, desc, trace_path)
self.create_device_from_hal(self_id, open, desc, trace_path)
}
}

Expand Down Expand Up @@ -828,10 +828,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
Ok(adapter) => adapter,
Err(_) => break RequestDeviceError::InvalidAdapter,
};
let device = match adapter.device_from_open(adapter_id, hal_device, desc, trace_path) {
Ok(device) => device,
Err(e) => break e,
};
let device =
match adapter.create_device_from_hal(adapter_id, hal_device, desc, trace_path) {
Ok(device) => device,
Err(e) => break e,
};
let id = fid.assign(device, &mut token);
return (id.0, None);
};
Expand Down

0 comments on commit 4b37b28

Please sign in to comment.