From 0e9991f957e296f46cfff40a94ffba0adf2a58e1 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Sun, 20 Nov 2016 17:48:27 +1100 Subject: glsl: don't reference shader prog data during cache fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already have a reference. Reviewed-by: Nicolai Hähnle --- src/mesa/main/shaderobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 222efc12c4e..2ca65442726 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -430,7 +430,8 @@ _mesa_delete_shader_program(struct gl_context *ctx, struct gl_shader_program *shProg) { _mesa_free_shader_program_data(ctx, shProg); - _mesa_reference_shader_program_data(ctx, &shProg->data, NULL); + if (!shProg->data->cache_fallback) + _mesa_reference_shader_program_data(ctx, &shProg->data, NULL); ralloc_free(shProg); } -- cgit v1.2.3