From 4a7666ee2b61bc75fe7a114a649487d6b4061aaf Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 14 Feb 2018 23:42:50 -0800 Subject: [PATCH] i965: Disable ARB_get_program_binary for compat profiles The QT framework has a bug in their shader program cache, which is built on GL_ARB_get_program_binary. In an effort to allow them to fix the bug we don't enable more than 1 binary format for compatibility profiles. This is only being done on the 18.0 release branch. Related bugs: https://bugreports.qt.io/browse/QTBUG-66420 https://bugs.freedesktop.org/show_bug.cgi?id=105065 Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_context.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index e2155ce6528..c26f74016c5 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -704,7 +704,14 @@ brw_initialize_context_constants(struct brw_context *brw) ctx->Const.AllowMappedBuffersDuringExecution = true; /* GL_ARB_get_program_binary */ - ctx->Const.NumProgramBinaryFormats = 1; + /* The QT framework has a bug in their shader program cache, which is built + * on GL_ARB_get_program_binary. In an effort to allow them to fix the bug + * we don't enable more than 1 binary format for compatibility profiles. + * This is only being done on the 18.0 release branch. + */ + if (ctx->API != API_OPENGL_COMPAT) { + ctx->Const.NumProgramBinaryFormats = 1; + } } static void -- 2.15.1