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 e950f9e..fa034ab 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3032,7 +3032,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
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev