From 048aada6df9a61694ef435f5adcb35a740a57700 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 30 Nov 2021 13:19:21 -0500 Subject: [PATCH] hal/gles: error on given context below 3.0 --- wgpu-hal/src/gles/adapter.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index c9ac66e47..7d6622528 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -189,6 +189,14 @@ impl super::Adapter { log::debug!("Extensions: {:#?}", extensions); let ver = Self::parse_version(&version).ok()?; + if ver < (3, 0) { + log::warn!( + "Returned GLES context is {}.{}, when 3.0+ was requested", + ver.0, + ver.1 + ); + return None; + } let supports_storage = ver >= (3, 1);