i965: Support 0 ARB_get_program_binary formats for compat profiles

The QT framework has a bug in their shader program cache, which is
built on GL_ARB_get_program_binary.

To give QT and distributions time to fix the bug and roll the fix out
to users, for the 18.0 release we will advertise support for 0 binary
formats for compatibility profiles.

This is only being done on the 18.0 release branch.

Ref: https://bugreports.qt.io/browse/QTBUG-66420
Ref: https://bugs.freedesktop.org/show_bug.cgi?id=105065
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
This commit is contained in:
Jordan Justen 2018-02-14 23:42:50 -08:00
parent 1e1734634b
commit 719f2c9340
2 changed files with 11 additions and 2 deletions

View file

@ -53,7 +53,9 @@ Note: some of the new features are only available with certain drivers.
<li>GL_ARB_enhanced_layouts on r600/evergreen+</li>
<li>GL_ARB_bindless_texture on nvc0/kepler</li>
<li>OpenGL 4.3 on r600/evergreen with hw fp64 support</li>
<li>Support 1 binary format for GL_ARB_get_program_binary on i965</li>
<li>Support 1 binary format for GL_ARB_get_program_binary on i965.
(For the 18.0 release, 0 formats continue to be supported in
compatibility profiles.)</li>
</ul>
<h2>Bug fixes</h2>

View file

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