summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-18 14:22:03 +1000
committerTimothy Arceri <[email protected]>2017-05-20 08:35:51 +1000
commit8cad301a3ea4d2cf6297200f5eb5e229928b9120 (patch)
tree45066e2697d18ed3076134e5ccd439c227f071ef /src
parent552cd5cce5ff75527d4755e1e2fb13ecf268575f (diff)
st/mesa: improve shader cache debug info
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. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_shader_cache.c6
1 files 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 23416c0c3fa..175d69d732e 100644
--- a/src/mesa/state_tracker/st_shader_cache.c
+++ b/src/mesa/state_tracker/st_shader_cache.c
@@ -368,8 +368,7 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx,
/* 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;
@@ -381,6 +380,9 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx,
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);
}