This will explicitly state that we are following the fallback path when we find invalid/corrupt cache items. It will also output the fallback message when the fallback path is forced via an environment variable, the following patches will allow this. --- src/mesa/state_tracker/st_shader_cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c index 23416c0..175d69d 100644 --- a/src/mesa/state_tracker/st_shader_cache.c +++ b/src/mesa/state_tracker/st_shader_cache.c @@ -361,32 +361,34 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx, st_set_prog_affected_state_flags(glprog); _mesa_associate_uniform_storage(ctx, prog, glprog->Parameters, false); free(buffer); } else { /* Failed to find a matching cached shader so fallback to recompile. */ if (ctx->_Shader->Flags & GLSL_CACHE_INFO) { - fprintf(stderr, "TGSI cache item not found falling back to " - "compile.\n"); + fprintf(stderr, "TGSI cache item not found.\n"); } goto fallback_recompile; } } return true; fallback_recompile: free(buffer); + if (ctx->_Shader->Flags & GLSL_CACHE_INFO) + fprintf(stderr, "TGSI cache falling back to recompile.\n"); + for (unsigned i = 0; i < prog->NumShaders; i++) { _mesa_glsl_compile_shader(ctx, prog->Shaders[i], false, false, true); } prog->data->cache_fallback = true; _mesa_glsl_link_shader(ctx, prog); return true; } -- 2.9.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev