aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-20 16:23:57 -0700
committerEric Anholt <[email protected]>2011-09-21 10:17:54 -0700
commita140c3e7837725bfa610c9f842a95201b661c773 (patch)
tree299b8224910f941396beef6c0977a0e562c188f2 /src/mesa
parentd4444b8e5b914cde428e549c0db9418ddc1402f6 (diff)
meta: Don't hang on to program refcounts after metaops are done.
Fixes piglit ARB_shader_objects/clear-with-deleted. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39577 Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/common/meta.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 9703475d031..b6e80d70ab9 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -740,6 +740,11 @@ _mesa_meta_end(struct gl_context *ctx)
_mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram,
save->ActiveShader);
+
+ _mesa_reference_shader_program(ctx, &save->VertexShader, NULL);
+ _mesa_reference_shader_program(ctx, &save->GeometryShader, NULL);
+ _mesa_reference_shader_program(ctx, &save->FragmentShader, NULL);
+ _mesa_reference_shader_program(ctx, &save->ActiveShader, NULL);
}
if (state & MESA_META_STENCIL_TEST) {