Browse Source

GL: fix "firefox-fake-disjoint-timer-query-webgl2" detection.

Firefox used to report iself as "Mozilla by Mozilla" but it's now
"Something whatever by Mozilla" which broke the detection.
pull/617/head
Vladimír Vondruš 3 years ago
parent
commit
8782d57ba6
  1. 4
      doc/changelog.dox
  2. 7
      src/Magnum/GL/Implementation/driverSpecific.cpp

4
doc/changelog.dox

@ -970,6 +970,10 @@ See also:
[mosra/magnum#535](https://github.com/mosra/magnum/issues/535))
- Fixed various wrong assumptions about Mac builds being always desktop GLES
(see [mosra/magnum#](https://github.com/mosra/magnum/issues/541))
- Fixed the @cpp "firefox-fake-disjoint-timer-query-webgl2" @ce workaround to
work on Firefox again. The reported renderer string got changed, possibly
in relation to @webgl_extension{WEBGL,debug_renderer_info} being
deprecated, which broke Firefox detection in the workaround enabling code.
@subsection changelog-latest-deprecated Deprecated APIs

7
src/Magnum/GL/Implementation/driverSpecific.cpp

@ -743,7 +743,12 @@ void Context::setupDriverWorkarounds() {
#endif
#if defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2)
if(rendererString() == "Mozilla"_s) {
/* Firefox used to report both rendererString() and vendorString() as
Mozilla (printing silly `Renderer: Mozilla by Mozilla` in the Magnum
startup log), but possibly in relation with WEBGL_debug_renderer_info
being deprecated in FF 92+ this changed and now Mozilla is only in
vendorString() and rendererString() is the actual system GPU. */
if(vendorString() == "Mozilla"_s) {
for(const auto& extension: extensionStrings()) {
if(extension == "GL_EXT_disjoint_timer_query"_s && !isDriverWorkaroundDisabled("firefox-fake-disjoint-timer-query-webgl2"_s)) {
_extensionStatus.set(Extensions::EXT::disjoint_timer_query_webgl2::Index, true);

Loading…
Cancel
Save