[Mesa-dev] [PATCH] meta: Don't hang on to program refcounts after metaops are done.
Eric Anholt
eric at anholt.net
Tue Sep 20 16:24:56 PDT 2011
Fixes piglit ARB_shader_objects/clear-with-deleted.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39577
---
src/mesa/drivers/common/meta.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1b71aa1..07e4b92 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) {
--
1.7.5.4
More information about the mesa-dev
mailing list