gles: Return the version as driver_info (#5753)

This commit is contained in:
Valaphee The Meerkat 2024-05-29 20:01:32 +02:00 committed by GitHub
parent de809c8f96
commit 23307e1dc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 26 deletions

View File

@ -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)
@ -109,6 +109,7 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410)
- 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)

View File

@ -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,
}
}