mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 23:38:06 +08:00
Upgrade vello to version 0.5.0 and wgpu to version 25 (#2890)
* update: vello * fix compile errors * create target texture lazily * fix TextureBlitter texture format mismatch * use `futures::lock::Mutex` instead of std Mutex --------- Co-authored-by: Firestar99 <firestar99@sydow.cloud>
This commit is contained in:
@@ -16,7 +16,7 @@ impl Context {
|
||||
backends: wgpu::Backends::all(),
|
||||
..Default::default()
|
||||
};
|
||||
let instance = Instance::new(instance_descriptor);
|
||||
let instance = Instance::new(&instance_descriptor);
|
||||
|
||||
let adapter_options = wgpu::RequestAdapterOptions {
|
||||
power_preference: wgpu::PowerPreference::HighPerformance,
|
||||
@@ -24,26 +24,24 @@ impl Context {
|
||||
force_fallback_adapter: false,
|
||||
};
|
||||
// `request_adapter` instantiates the general connection to the GPU
|
||||
let adapter = instance.request_adapter(&adapter_options).await?;
|
||||
let adapter = instance.request_adapter(&adapter_options).await.ok()?;
|
||||
|
||||
let required_limits = adapter.limits();
|
||||
// `request_device` instantiates the feature specific connection to the GPU, defining some parameters,
|
||||
// `features` being the available features.
|
||||
let (device, queue) = adapter
|
||||
.request_device(
|
||||
&wgpu::DeviceDescriptor {
|
||||
label: None,
|
||||
// #[cfg(not(feature = "passthrough"))]
|
||||
required_features: wgpu::Features::empty(),
|
||||
// Currently disabled because not all backend support passthrough.
|
||||
// TODO: reenable only when vulkan adapter is available
|
||||
// #[cfg(feature = "passthrough")]
|
||||
// required_features: wgpu::Features::SPIRV_SHADER_PASSTHROUGH,
|
||||
required_limits,
|
||||
memory_hints: Default::default(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
.request_device(&wgpu::DeviceDescriptor {
|
||||
label: None,
|
||||
// #[cfg(not(feature = "passthrough"))]
|
||||
required_features: wgpu::Features::empty(),
|
||||
// Currently disabled because not all backend support passthrough.
|
||||
// TODO: reenable only when vulkan adapter is available
|
||||
// #[cfg(feature = "passthrough")]
|
||||
// required_features: wgpu::Features::SPIRV_SHADER_PASSTHROUGH,
|
||||
required_limits,
|
||||
memory_hints: Default::default(),
|
||||
trace: wgpu::Trace::Off,
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user