diff --git a/crates/egui-wgpu/src/lib.rs b/crates/egui-wgpu/src/lib.rs index d03e4e046f66..acc79ad00a3a 100644 --- a/crates/egui-wgpu/src/lib.rs +++ b/crates/egui-wgpu/src/lib.rs @@ -230,7 +230,8 @@ pub struct WgpuConfiguration { pub supported_backends: wgpu::Backends, /// Configuration passed on device request, given an adapter - pub device_descriptor: Arc wgpu::DeviceDescriptor<'static>>, + pub device_descriptor: + Arc wgpu::DeviceDescriptor<'static> + Send + Sync>, /// Present mode used for the primary surface. pub present_mode: wgpu::PresentMode, @@ -248,7 +249,13 @@ pub struct WgpuConfiguration { pub power_preference: wgpu::PowerPreference, /// Callback for surface errors. - pub on_surface_error: Arc SurfaceErrorAction>, + pub on_surface_error: Arc SurfaceErrorAction + Send + Sync>, +} + +#[test] +fn wgpu_config_impl_send_sync() { + fn assert_send_sync() {} + assert_send_sync::(); } impl std::fmt::Debug for WgpuConfiguration {