diff options
author | Marek Olšák <[email protected]> | 2018-02-23 20:42:41 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-03-20 16:57:24 +0000 |
commit | 3894eab901fbf0c19854abb0a531ce490b72b2da (patch) | |
tree | e46815e8e0e13d104dc3141724239752a020bf3b /src/mesa/state_tracker/st_extensions.c | |
parent | ea43ba4e930d6fd822d171d021ec354a64664857 (diff) |
st/mesa: expose 0 shader binary formats for compat profiles for Qt
Bugzilla: https://bugreports.qt.io/browse/QTBUG-66420
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105065
Cc: "18.0" <[email protected]>
Tested-by: Kai Wasserbäch <[email protected]>
(cherry picked from commit 55376cb31e2f495a4d872b4ffce2135c3365b873)
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index d00ee83c055..c2fe9551a31 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -73,7 +73,8 @@ static int _clamp(int a, int min, int max) * Note that we have to limit/clamp against Mesa's internal limits too. */ void st_init_limits(struct pipe_screen *screen, - struct gl_constants *c, struct gl_extensions *extensions) + struct gl_constants *c, struct gl_extensions *extensions, + gl_api api) { int supported_irs; unsigned sh; @@ -417,8 +418,14 @@ void st_init_limits(struct pipe_screen *screen, c->GLSLFrontFacingIsSysVal = screen->get_param(screen, PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL); - /* GL_ARB_get_program_binary */ - if (screen->get_disk_shader_cache && screen->get_disk_shader_cache(screen)) + /* GL_ARB_get_program_binary + * + * 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. + */ + if (api != API_OPENGL_COMPAT && + screen->get_disk_shader_cache && screen->get_disk_shader_cache(screen)) c->NumProgramBinaryFormats = 1; c->MaxAtomicBufferBindings = |