[Mesa-dev] [PATCH 61/77] i965: add support for gs shader cache fallback

Timothy Arceri timothy.arceri at collabora.com
Mon Oct 3 06:05:20 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_shader_cache.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c
index 3d06c2b..6b75303 100644
--- a/src/mesa/drivers/dri/i965/brw_shader_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_shader_cache.c
@@ -99,10 +99,14 @@ fallback_to_full_recompile(struct brw_context *brw,
 
       struct gl_program *vp =
          shProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program;
+      struct gl_program *gp = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY] ?
+         shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program : NULL;
       struct gl_program *fp = shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] ?
          shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program : NULL;
 
       vp->cache_fallback = true;
+      if (gp)
+         gp->cache_fallback = true;
       if (fp)
          fp->cache_fallback = true;
 
@@ -113,6 +117,8 @@ fallback_to_full_recompile(struct brw_context *brw,
       _mesa_glsl_link_shader(&brw->ctx, shProg, true);
 
       vp->cache_fallback = false;
+      if (gp)
+         gp->cache_fallback = false;
       if (fp)
          fp->cache_fallback = false;
    }
-- 
2.7.4



More information about the mesa-dev mailing list