summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 88dd897820..8ddb693e73 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -289,8 +289,12 @@ 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"))
- features |= QOpenGLFunctions::TextureRGFormats;
+ 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")))
+ features |= QOpenGLFunctions::TextureRGFormats;
+ }
return features;
} else {
// OpenGL