hal/gles: error on given context below 3.0

This commit is contained in:
Dzmitry Malyshau 2021-11-30 13:19:21 -05:00
parent 46bd6c16e2
commit 048aada6df

View File

@ -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);