summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/shader_cache.cpp2
-rw-r--r--src/mesa/main/mtypes.h7
-rw-r--r--src/mesa/state_tracker/st_shader_cache.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 738e5488ac2..1da32d335d9 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
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c4fab9dbac2..9569b6a53fa 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2823,6 +2823,13 @@ struct gl_shader_program_data
bool cache_fallback;
+ /* TODO: This used by Gallium drivers to skip the cache on tgsi fallback.
+ * All structures (gl_program, uniform storage, etc) will get recreated
+ * even though we have already loaded them from cache. Once the i965 cache
+ * lands we should switch to using the cache_fallback support.
+ */
+ bool skip_cache;
+
/** List of all active resources after linking. */
struct gl_program_resource *ProgramResourceList;
unsigned NumProgramResourceList;
diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c
index 1a11f1135d7..e04c9a244a5 100644
--- a/src/mesa/state_tracker/st_shader_cache.c
+++ b/src/mesa/state_tracker/st_shader_cache.c
@@ -405,7 +405,7 @@ fallback_recompile:
_mesa_glsl_compile_shader(ctx, prog->Shaders[i], false, false, true);
}
- prog->data->cache_fallback = true;
+ prog->data->skip_cache = true;
_mesa_glsl_link_shader(ctx, prog);
return true;