summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-20 17:48:27 +1100
committerTimothy Arceri <[email protected]>2017-02-17 11:18:43 +1100
commit0e9991f957e296f46cfff40a94ffba0adf2a58e1 (patch)
tree107160c7677f968bc1f348f30fda8bd56dae7ea1 /src/mesa/main
parent2f19accc5ecdff29c9300f0eceb420c0b1538b24 (diff)
glsl: don't reference shader prog data during cache fallback
We already have a reference. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shaderobj.c3
1 files changed, 2 insertions, 1 deletions
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);
}