Mesa (master): i965: Allow disk shader cache usage with LINKING_SUCCESS status

Jordan Justen jljusten at kemper.freedesktop.org
Mon Mar 19 17:57:01 UTC 2018


Module: Mesa
Branch: master
Commit: d2b74ca2b503e1b8c1e58ac1c33d3631e1b30d6e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2b74ca2b503e1b8c1e58ac1c33d3631e1b30d6e

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Tue Mar 13 12:14:23 2018 -0700

i965: Allow disk shader cache usage with LINKING_SUCCESS status

Currently, we only look in the disk shader cache if we see that the
shader program is in the cache during the link step.

If the shader cache entry isn't found during the program link, there
are still some (fairly unlikely) scenarios where later it might be
useful to search the cache for gen binary programs.

1. If the cache evicts the serialized glsl cache, there might still be
   valid gen program entries in the disk cache.

2. If two applications are running in parallel, then it is possible
   that one may write out the cached gen program item which the other
   application can then make use of.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mesa/drivers/dri/i965/brw_disk_cache.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_disk_cache.c b/src/mesa/drivers/dri/i965/brw_disk_cache.c
index c77e921b6a..ee6067ca51 100644
--- a/src/mesa/drivers/dri/i965/brw_disk_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_disk_cache.c
@@ -283,9 +283,6 @@ brw_disk_cache_upload_program(struct brw_context *brw, gl_shader_stage stage)
    if (brw->ctx._Shader->Flags & GLSL_CACHE_FALLBACK)
       goto fail;
 
-   if (prog->sh.data->LinkStatus != LINKING_SKIPPED)
-      goto fail;
-
    if (!read_and_upload(brw, cache, prog, stage))
       goto fail;
 




More information about the mesa-commit mailing list