mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
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 <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
552cd5cce5
commit
8cad301a3e
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue