summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-18 15:10:08 +1000
committerTimothy Arceri <[email protected]>2017-05-20 08:35:51 +1000
commit80e643345ed0d8d3263b4ee23dd2998f0da170a8 (patch)
treed7c837a0f6d1e105bbd68cfb932dd2647d60a81d /src/compiler/glsl
parenta74300c7ff256b417079134f7bd9aea91153025b (diff)
st/mesa: don't mark the program as in cache_fallback when there is cache miss
When we fallback currently the gl_program objects are re-allocated. This is likely to change when the i965 cache lands, but for now this fixes a crash when using MESA_GLSL=cache_fb. This env var simulates the fallback path taken when a tgsi cache item doesn't exist due to being evicted previously or some kind of error. Unlike i965 we are always falling back at link time so it's safe to just re-allocate everything. We will be unnecessarily freeing and re-allocate a bunch of things here but it's probably not a huge deal, and can be changed when the i965 code lands. Fixes: 0e9991f957e2 ("glsl: don't reference shader prog data during cache fallback") Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/shader_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 800d3a29133..dd56501258c 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1292,7 +1292,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
return false;
struct disk_cache *cache = ctx->Cache;
- if (!cache || prog->data->cache_fallback)
+ if (!cache || prog->data->cache_fallback || prog->data->skip_cache)
return false;
/* Include bindings when creating sha1. These bindings change the resulting