[Mesa-dev] [PATCH 24/88] glsl: compile shaders when program not found in cache
Timothy Arceri
timothy.arceri at collabora.com
Sat Sep 24 05:25:05 UTC 2016
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 0609f41..9c5b6ef 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -665,9 +665,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
More information about the mesa-dev
mailing list