mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +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_device: A::Device,
|
||||||
raw_queue: &A::Queue,
|
raw_queue: &A::Queue,
|
||||||
adapter: &Arc<Adapter<A>>,
|
adapter: &Arc<Adapter<A>>,
|
||||||
alignments: hal::Alignments,
|
|
||||||
downlevel: wgt::DownlevelCapabilities,
|
|
||||||
desc: &DeviceDescriptor,
|
desc: &DeviceDescriptor,
|
||||||
trace_path: Option<&std::path::Path>,
|
trace_path: Option<&std::path::Path>,
|
||||||
instance_flags: wgt::InstanceFlags,
|
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 {
|
Ok(Self {
|
||||||
raw: Some(raw_device),
|
raw: Some(raw_device),
|
||||||
adapter: adapter.clone(),
|
adapter: adapter.clone(),
|
||||||
|
@ -309,13 +309,10 @@ impl<A: HalApi> Adapter<A> {
|
|||||||
) -> Result<(Device<A>, Queue<A>), RequestDeviceError> {
|
) -> Result<(Device<A>, Queue<A>), RequestDeviceError> {
|
||||||
api_log!("Adapter::create_device");
|
api_log!("Adapter::create_device");
|
||||||
|
|
||||||
let caps = &self.raw.capabilities;
|
|
||||||
if let Ok(device) = Device::new(
|
if let Ok(device) = Device::new(
|
||||||
hal_device.device,
|
hal_device.device,
|
||||||
&hal_device.queue,
|
&hal_device.queue,
|
||||||
self,
|
self,
|
||||||
caps.alignments.clone(),
|
|
||||||
caps.downlevel.clone(),
|
|
||||||
desc,
|
desc,
|
||||||
trace_path,
|
trace_path,
|
||||||
instance_flags,
|
instance_flags,
|
||||||
|
Loading…
Reference in New Issue
Block a user