Skip to content

464255 OpenGL: increase minimum to ES3 / 4.1 Compatibility / 4.1 Core

Amy spark requested to merge lsegovia/krita:work/amyspark/opengl-try-2 into master

This is the second attempt of commit ca645e71. For this one, I've ported Qt's dynamic OpenGL module detection (which we cannot run at this time due to QGuiApplication having not yet been instanced), and split the minimum version per-operating system flavor.

For all OpenGL ES users, the new version will be fixed to 3.0 + QSurfaceFormat::NoProfile (already the default-- CompatibilityProfile and DeprecatedFunctions are no-ops).

For desktop GL users not on macOS, the new version will be fixed to 3.3 Compatibility. While testing, I found that it was easy to induce a "crash" (in fact, forced process exit by X11) by asking NVIDIA's GLX implementation to instantiate a 4.x surface if it was set to GLES (whether by setRenderableType or by using NoProfile). For that reason I've kept the Compatibility profile but without DeprecatedFunctions-- that way the display driver returns the maximum supported version.

For all desktop OpenGL users on a Mac, we use the Apple default and sole supported version, 4.1 Core.

This reverts commit fa671d40.

BUG:464255

CCMAIL:kimageshop@kde.org

Test Plan

This change only affects Linux desktops, so build Krita and check that Mesa/llvmpipe/Gallium is kept happy after the version change.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Amy spark

Merge request reports