[Mesa-dev] [PATCH 42/68] glsl: don't cache shader if linking fails
Timothy Arceri
timothy.arceri at collabora.com
Wed Jun 1 06:23:23 UTC 2016
Fixes crash in piglit tests. The assumption is that linking was successful
if we see the linked program in the cache.
---
src/mesa/program/ir_to_mesa.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index f99b6cf..179413c 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3093,7 +3093,8 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog,
}
#ifdef ENABLE_SHADER_CACHE
- shader_cache_write_program_metadata(ctx, prog);
+ if (prog->LinkStatus)
+ shader_cache_write_program_metadata(ctx, prog);
#endif
}
--
2.5.5
More information about the mesa-dev
mailing list