From 23307e1dc355df3686547c48e9d1523105faa735 Mon Sep 17 00:00:00 2001 From: Valaphee The Meerkat <32491319+valaphee@users.noreply.github.com> Date: Wed, 29 May 2024 20:01:32 +0200 Subject: [PATCH] gles: Return the version as driver_info (#5753) --- CHANGELOG.md | 9 +++++---- wgpu-hal/src/gles/adapter.rs | 24 ++---------------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff3eb46b9..9ed0ded2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,7 +92,7 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410) ### Bug Fixes -### General +#### General - Ensure render pipelines have at least 1 target. By @ErichDonGubler in [#5715](https://github.com/gfx-rs/wgpu/pull/5715) @@ -106,9 +106,10 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410) #### GLES / OpenGL -- Fix regression on OpenGL (EGL) where non-sRGB still used sRGB [#5642](https://github.com/gfx-rs/wgpu/pull/5642) -- Fix `ClearColorF`, `ClearColorU` and `ClearColorI` commands being issued before `SetDrawColorBuffers` [#5666](https://github.com/gfx-rs/wgpu/pull/5666) -- Replace `glClear` with `glClearBufferF` because `glDrawBuffers` requires that the ith buffer must be `COLOR_ATTACHMENTi` or `NONE` [#5666](https://github.com/gfx-rs/wgpu/pull/5666) +- Fix regression on OpenGL (EGL) where non-sRGB still used sRGB [#5642](https://github.com/gfx-rs/wgpu/pull/5642) +- Fix `ClearColorF`, `ClearColorU` and `ClearColorI` commands being issued before `SetDrawColorBuffers` [#5666](https://github.com/gfx-rs/wgpu/pull/5666) +- Replace `glClear` with `glClearBufferF` because `glDrawBuffers` requires that the ith buffer must be `COLOR_ATTACHMENTi` or `NONE` [#5666](https://github.com/gfx-rs/wgpu/pull/5666) +- Return the unmodified version in driver_info. By @Valaphee in [#5753](https://github.com/gfx-rs/wgpu/pull/5753) ## v0.20.0 (2024-04-28) diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index 03c026aa2..926b5afbc 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -179,33 +179,13 @@ impl super::Adapter { 0 }; - let driver; - let driver_info; - if version.starts_with("WebGL ") || version.starts_with("OpenGL ") { - let es_sig = " ES"; - match version.find(es_sig) { - Some(pos) => { - driver = version[..pos + es_sig.len()].to_owned(); - driver_info = version[pos + es_sig.len() + 1..].to_owned(); - } - None => { - let pos = version.find(' ').unwrap(); - driver = version[..pos].to_owned(); - driver_info = version[pos + 1..].to_owned(); - } - } - } else { - driver = "OpenGL".to_owned(); - driver_info = version; - } - wgt::AdapterInfo { name: renderer_orig, vendor: vendor_id, device: 0, device_type: inferred_device_type, - driver, - driver_info, + driver: "".to_owned(), + driver_info: version, backend: wgt::Backend::Gl, } }