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>
This commit is contained in:
Laszlo Agocs 2015-03-19 17:21:00 +01:00
parent ba287c55ef
commit 7715ce9fab

View File

@ -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: