From 65cdd0f36678a6b77caf9cf0007ad44c51f7f7af Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 4 Jun 2019 14:42:31 -0500 Subject: Enable shader cache for ES2 when GL_OES_get_program_binary is present Change-Id: I4fb71471a7dd22441def1eb837857d245c3e3c5a Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglshaderprogram.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gui/opengl/qopenglshaderprogram.cpp') diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index c39177080d..3ce0cf230b 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -3753,8 +3753,14 @@ QOpenGLProgramBinarySupportCheck::QOpenGLProgramBinarySupportCheck(QOpenGLContex if (ctx) { if (ctx->isOpenGLES()) { qCDebug(DBG_SHADER_CACHE, "OpenGL ES v%d context", ctx->format().majorVersion()); - if (ctx->format().majorVersion() >= 3) + if (ctx->format().majorVersion() >= 3) { m_supported = true; + } else { + const bool hasExt = ctx->hasExtension("GL_OES_get_program_binary"); + qCDebug(DBG_SHADER_CACHE, "GL_OES_get_program_binary support = %d", hasExt); + if (hasExt) + m_supported = true; + } } else { const bool hasExt = ctx->hasExtension("GL_ARB_get_program_binary"); qCDebug(DBG_SHADER_CACHE, "GL_ARB_get_program_binary support = %d", hasExt); -- cgit v1.2.3