diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-19 17:21:00 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-20 14:06:15 +0000 |
commit | 7715ce9fab3b5f46f1d7e0a1503323200790d9c6 (patch) | |
tree | 923cc4cfdd2a3dde735782c6164ae96db2bf7d87 /src/gui/opengl | |
parent | ba287c55ef179b073482453298f513992b54c11e (diff) |
Disable usage of glTexStorage on Mali ES 3.0
Even though immutable storage is available and the glTexStorage2D seems to succeed,
the subsequent glTexSubImage2D calls always fail with GL_INVALID_OPERATION.
Falling back to mutable storage works just fine.
This makes QOpenGLTexture and examples like qtbase's textures functional on Mali T628
(tested with Odroid XU-3).
Task-number: QTBUG-45106
Change-Id: If1b4fe6673ba924cfa7cfd7af7d4f0bc3b6a0fe8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r-- | src/gui/opengl/qopengltexture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index f480a2a109..fa4b6cdab0 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -3278,10 +3278,11 @@ bool QOpenGLTexture::hasFeature(Feature feature) if (ctx->isOpenGLES()) #endif { + const char *renderer = reinterpret_cast<const char *>(ctx->functions()->glGetString(GL_RENDERER)); switch (feature) { case ImmutableStorage: - supported = f.version() >= qMakePair(3, 0) - || ctx->hasExtension(QByteArrayLiteral("EXT_texture_storage")); + supported = (f.version() >= qMakePair(3, 0) || ctx->hasExtension(QByteArrayLiteral("EXT_texture_storage"))) + && !(renderer && strstr(renderer, "Mali")); // do not use on Mali: QTBUG-45106 break; case ImmutableMultisampleStorage: |