diff --git a/crates/egui-wgpu/src/lib.rs b/crates/egui-wgpu/src/lib.rs index e2c22a5cffc..8628bd06652 100644 --- a/crates/egui-wgpu/src/lib.rs +++ b/crates/egui-wgpu/src/lib.rs @@ -159,10 +159,11 @@ impl RenderState { ); } + let trace_path = std::env::var("WGPU_TRACE"); let (device, queue) = { crate::profile_scope!("request_device"); adapter - .request_device(&(*device_descriptor)(&adapter), None) + .request_device(&(*device_descriptor)(&adapter), trace_path.ok().as_ref().map(std::path::Path::new)) .await? };