[Mesa-dev] [PATCH 76/87] i965: add cache fallback support for tess stages

Timothy Arceri timothy.arceri at collabora.com
Wed Jul 13 02:48:11 UTC 2016


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

diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c
index 1aebaf8..96a84aa 100644
--- a/src/mesa/drivers/dri/i965/brw_shader_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_shader_cache.c
@@ -170,12 +170,20 @@ fallback_to_full_recompile(struct brw_context *brw,
 
       struct gl_program *vp =
          shProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program;
+      struct gl_program *tcp = shProg->_LinkedShaders[MESA_SHADER_TESS_CTRL] ?
+         shProg->_LinkedShaders[MESA_SHADER_TESS_CTRL]->Program : NULL;
+      struct gl_program *tep = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL] ?
+         shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->Program : NULL;
       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 (tcp)
+         tcp->cache_fallback = true;
+      if (tep)
+         tep->cache_fallback = true;
       if (gp)
          gp->cache_fallback = true;
       if (fp)
@@ -188,6 +196,10 @@ fallback_to_full_recompile(struct brw_context *brw,
       _mesa_glsl_link_shader(&brw->ctx, shProg, true);
 
       vp->cache_fallback = false;
+      if (tcp)
+         tcp->cache_fallback = true;
+      if (tep)
+         tep->cache_fallback = true;
       if (gp)
          gp->cache_fallback = false;
       if (fp)
-- 
2.7.4



More information about the mesa-dev mailing list