Desktop: Add rudimentary support for custom WGPU adapter selection (#3201)

* rudimentary custom wgpu adapter selection

* WgpuContextBuilder

* wasm fix

* fix wasm warnings

* Clean up

* Review suggestions

* fix
This commit is contained in:
Timon
2025-09-25 14:38:26 +00:00
committed by GitHub
parent 4e47b5db93
commit ed22e6a63d
8 changed files with 181 additions and 54 deletions
+3 -3
View File
@@ -2,8 +2,6 @@ use std::process::exit;
use tracing_subscriber::EnvFilter;
use winit::event_loop::EventLoop;
use graphite_desktop_wrapper::WgpuContext;
pub(crate) mod consts;
mod app;
@@ -14,6 +12,8 @@ mod native_window;
mod persist;
mod render;
mod gpu_context;
use app::App;
use cef::CefHandler;
use event::CreateAppEventSchedulerEventLoopExt;
@@ -31,7 +31,7 @@ fn main() {
return;
}
let wgpu_context = futures::executor::block_on(WgpuContext::new()).unwrap();
let wgpu_context = futures::executor::block_on(gpu_context::create_wgpu_context());
let event_loop = EventLoop::new().unwrap();
let (app_event_sender, app_event_receiver) = std::sync::mpsc::channel();