We may have seen the individual shaders before and skipped compiling
but they may not have been used together in this combination before.

We could probably only compile the shaders which were skipped here
but we need to be careful because the source may also have been
changed since the last compile so for now we just recompile
everything.
---
 src/compiler/glsl/shader_cache.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/shader_cache.cpp 
b/src/compiler/glsl/shader_cache.cpp
index 4903980..c7d9e80 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -679,9 +679,10 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
 
    buffer = (uint8_t *) cache_get(cache, prog->sha1, &size);
    if (buffer == NULL) {
-      /* FIXME: Fall back and link shaders here, if necessary, compile any
-       * shaders we didn't compile earlier.
+      /* Cached program not found. Fall back to linking shaders but first
+       * compile any shaders we didn't compile earlier.
        */
+      compile_shaders(ctx, prog);
       return false;
    }
 
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to