From 6662fec55bb216496459155a80c18061bfca3996 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Fri, 12 Nov 2021 11:01:32 -0800 Subject: [PATCH] Set default device limits to `downlevel_webgl2_defaults` (#223) - Fixes #139 - See also #115 --- examples/minimal-egui/Cargo.toml | 2 +- src/builder.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/minimal-egui/Cargo.toml b/examples/minimal-egui/Cargo.toml index 7188d43..0bd58c8 100644 --- a/examples/minimal-egui/Cargo.toml +++ b/examples/minimal-egui/Cargo.toml @@ -12,7 +12,7 @@ default = ["optimize"] [dependencies] egui = "0.15" -egui_wgpu_backend = { git = "https://github.com/hasenbanck/egui_wgpu_backend.git", rev = "961125e7bd2c71c5ead1d61a7ca7ffa8c0d17f48" } +egui_wgpu_backend = "0.14" egui-winit = { version = "0.15", default-features = false, features = ["links"] } env_logger = "0.9" log = "0.4" diff --git a/src/builder.rs b/src/builder.rs index d1d2cd7..c461e96 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -46,7 +46,10 @@ impl<'req, 'dev, 'win, W: HasRawWindowHandle> PixelsBuilder<'req, 'dev, 'win, W> Self { request_adapter_options: None, - device_descriptor: wgpu::DeviceDescriptor::default(), + device_descriptor: wgpu::DeviceDescriptor { + limits: wgpu::Limits::downlevel_webgl2_defaults(), + ..wgpu::DeviceDescriptor::default() + }, backend: wgpu::util::backend_bits_from_env().unwrap_or(wgpu::Backends::PRIMARY), width, height,