Drop a limitation for R8/RG8 formats for Mesa in hasOpenGLFeature

The mentioned version is from 2015.

Change-Id: I330bd8ec08ab815a85d3e4e5afc44f314ade2ef6
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 20b07bfa305153b8d828e133bb7dda838c2166c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Laszlo Agocs 2025-01-09 12:15:23 +01:00 committed by Qt Cherry-pick Bot
parent 2f632086e9
commit 6fe4ebce70

View File

@ -239,12 +239,8 @@ static int qt_gl_resolve_features()
if (extensions.match("GL_OES_texture_npot"))
features |= QOpenGLFunctions::NPOTTextures |
QOpenGLFunctions::NPOTTextureRepeat;
if (ctx->format().majorVersion() >= 3 || extensions.match("GL_EXT_texture_rg")) {
// Mesa's GLES implementation (as of 10.6.0) is unable to handle this, even though it provides 3.0.
const char *renderer = reinterpret_cast<const char *>(ctx->functions()->glGetString(GL_RENDERER));
if (!(renderer && strstr(renderer, "Mesa")))
if (ctx->format().majorVersion() >= 3 || extensions.match("GL_EXT_texture_rg"))
features |= QOpenGLFunctions::TextureRGFormats;
}
if (ctx->format().majorVersion() >= 3) {
features |= QOpenGLFunctions::MultipleRenderTargets;
if (ctx->format().minorVersion() >= 2 && extensions.match("GL_KHR_blend_equation_advanced_coherent")) {