Skip to content

Commit 23307e1

Browse files
authored
gles: Return the version as driver_info (#5753)
1 parent de809c8 commit 23307e1

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410)
9292

9393
### Bug Fixes
9494

95-
### General
95+
#### General
9696

9797
- Ensure render pipelines have at least 1 target. By @ErichDonGubler in [#5715](https://github.com/gfx-rs/wgpu/pull/5715)
9898

@@ -106,9 +106,10 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410)
106106

107107
#### GLES / OpenGL
108108

109-
- Fix regression on OpenGL (EGL) where non-sRGB still used sRGB [#5642](https://github.com/gfx-rs/wgpu/pull/5642)
110-
- Fix `ClearColorF`, `ClearColorU` and `ClearColorI` commands being issued before `SetDrawColorBuffers` [#5666](https://github.com/gfx-rs/wgpu/pull/5666)
111-
- 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)
109+
- Fix regression on OpenGL (EGL) where non-sRGB still used sRGB [#5642](https://github.com/gfx-rs/wgpu/pull/5642)
110+
- Fix `ClearColorF`, `ClearColorU` and `ClearColorI` commands being issued before `SetDrawColorBuffers` [#5666](https://github.com/gfx-rs/wgpu/pull/5666)
111+
- 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)
112+
- Return the unmodified version in driver_info. By @Valaphee in [#5753](https://github.com/gfx-rs/wgpu/pull/5753)
112113

113114
## v0.20.0 (2024-04-28)
114115

wgpu-hal/src/gles/adapter.rs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -179,33 +179,13 @@ impl super::Adapter {
179179
0
180180
};
181181

182-
let driver;
183-
let driver_info;
184-
if version.starts_with("WebGL ") || version.starts_with("OpenGL ") {
185-
let es_sig = " ES";
186-
match version.find(es_sig) {
187-
Some(pos) => {
188-
driver = version[..pos + es_sig.len()].to_owned();
189-
driver_info = version[pos + es_sig.len() + 1..].to_owned();
190-
}
191-
None => {
192-
let pos = version.find(' ').unwrap();
193-
driver = version[..pos].to_owned();
194-
driver_info = version[pos + 1..].to_owned();
195-
}
196-
}
197-
} else {
198-
driver = "OpenGL".to_owned();
199-
driver_info = version;
200-
}
201-
202182
wgt::AdapterInfo {
203183
name: renderer_orig,
204184
vendor: vendor_id,
205185
device: 0,
206186
device_type: inferred_device_type,
207-
driver,
208-
driver_info,
187+
driver: "".to_owned(),
188+
driver_info: version,
209189
backend: wgt::Backend::Gl,
210190
}
211191
}

0 commit comments

Comments
 (0)