mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Desktop: Fix crash caused by submitting work mid surface-reconfigure (#4317)
Implement wgpu-sync
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use wgpu::{Adapter, Backends, Device, Features, Instance, Queue};
|
||||
use wgpu::{Backends, Device, Features};
|
||||
use wgpu_sync::{Adapter, Instance, Queue};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Context {
|
||||
@@ -77,10 +78,10 @@ impl ContextBuilder {
|
||||
}
|
||||
impl ContextBuilder {
|
||||
fn build_instance(&self) -> Instance {
|
||||
Instance::new(wgpu::InstanceDescriptor {
|
||||
Instance::new(wgpu::Instance::new(wgpu::InstanceDescriptor {
|
||||
backends: self.backends,
|
||||
..wgpu::InstanceDescriptor::new_without_display_handle()
|
||||
})
|
||||
}))
|
||||
}
|
||||
#[cfg(target_family = "wasm")]
|
||||
async fn request_adapter(&self, instance: &Instance) -> Option<Adapter> {
|
||||
|
||||
Reference in New Issue
Block a user