summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp5
-rw-r--r--src/opengl/qgl.cpp1
-rw-r--r--src/opengl/qgl_egl.cpp2
-rw-r--r--src/opengl/qgl_p.h1
4 files changed, 8 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 1b879c3..ba311c3 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -323,6 +323,9 @@ int QGLTextureGlyphCache::maxTextureWidth() const
int QGLTextureGlyphCache::maxTextureHeight() const
{
- return ctx->d_ptr->maxTextureSize();
+ if (ctx->d_ptr->workaround_brokenTexSubImage)
+ return qMin(1024, ctx->d_ptr->maxTextureSize());
+ else
+ return ctx->d_ptr->maxTextureSize();
}
QT_END_NAMESPACE
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 18f1203..9bf879a 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1706,6 +1706,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
active_engine = 0;
workaround_needsFullClearOnEveryFrame = false;
workaround_brokenFBOReadBack = false;
+ workaround_brokenTexSubImage = false;
workaroundsCached = false;
workaround_brokenTextureFromPixmap = false;
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 8902099..6f9e39c 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -204,6 +204,8 @@ void QGLContext::makeCurrent()
const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION);
if (egl_version && strstr(egl_version, "1.3"))
d->workaround_brokenFBOReadBack = true;
+ else if (egl_version && strstr(egl_version, "1.4"))
+ d->workaround_brokenTexSubImage = true;
}
}
}
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index b46d428..bf830ba 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -401,6 +401,7 @@ public:
// workarounds for driver/hw bugs on different platforms
uint workaround_needsFullClearOnEveryFrame : 1;
uint workaround_brokenFBOReadBack : 1;
+ uint workaround_brokenTexSubImage : 1;
uint workaroundsCached : 1;
uint workaround_brokenTextureFromPixmap : 1;