mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
move alignments
& downlevel
.clone()
s inside function
This commit is contained in:
parent
6ff5f8e4ad
commit
acdc9fcced
@ -192,8 +192,6 @@ impl<A: HalApi> Device<A> {
|
||||
raw_device: A::Device,
|
||||
raw_queue: &A::Queue,
|
||||
adapter: &Arc<Adapter<A>>,
|
||||
alignments: hal::Alignments,
|
||||
downlevel: wgt::DownlevelCapabilities,
|
||||
desc: &DeviceDescriptor,
|
||||
trace_path: Option<&std::path::Path>,
|
||||
instance_flags: wgt::InstanceFlags,
|
||||
@ -243,6 +241,9 @@ impl<A: HalApi> Device<A> {
|
||||
}));
|
||||
}
|
||||
|
||||
let alignments = adapter.raw.capabilities.alignments.clone();
|
||||
let downlevel = adapter.raw.capabilities.downlevel.clone();
|
||||
|
||||
Ok(Self {
|
||||
raw: Some(raw_device),
|
||||
adapter: adapter.clone(),
|
||||
|
@ -309,13 +309,10 @@ impl<A: HalApi> Adapter<A> {
|
||||
) -> Result<(Device<A>, Queue<A>), RequestDeviceError> {
|
||||
api_log!("Adapter::create_device");
|
||||
|
||||
let caps = &self.raw.capabilities;
|
||||
if let Ok(device) = Device::new(
|
||||
hal_device.device,
|
||||
&hal_device.queue,
|
||||
self,
|
||||
caps.alignments.clone(),
|
||||
caps.downlevel.clone(),
|
||||
desc,
|
||||
trace_path,
|
||||
instance_flags,
|
||||
|
Loading…
Reference in New Issue
Block a user