Mesa (master): vc4: Fix memory leak as of 0404e7fe0ac2a6234a11290b4b1596e8bc127a4b.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Jan 1 00:20:17 UTC 2015
Module: Mesa
Branch: master
Commit: 37478c638a3607295437ce0a41dae03c200948f4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=37478c638a3607295437ce0a41dae03c200948f4
Author: Eric Anholt <eric at anholt.net>
Date: Tue Dec 30 16:10:28 2014 -0800
vc4: Fix memory leak as of 0404e7fe0ac2a6234a11290b4b1596e8bc127a4b.
Can't reset the CL before looking at how much we had pupt in it.
---
src/gallium/drivers/vc4/vc4_context.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index e4e4330..62f77b3 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -296,16 +296,16 @@ vc4_setup_rcl(struct vc4_context *vc4)
static void
vc4_draw_reset(struct vc4_context *vc4)
{
- vc4_reset_cl(&vc4->bcl);
- vc4_reset_cl(&vc4->rcl);
- vc4_reset_cl(&vc4->shader_rec);
- vc4_reset_cl(&vc4->uniforms);
- vc4_reset_cl(&vc4->bo_handles);
struct vc4_bo **referenced_bos = vc4->bo_pointers.base;
for (int i = 0; i < (vc4->bo_handles.next -
vc4->bo_handles.base) / 4; i++) {
vc4_bo_unreference(&referenced_bos[i]);
}
+ vc4_reset_cl(&vc4->bcl);
+ vc4_reset_cl(&vc4->rcl);
+ vc4_reset_cl(&vc4->shader_rec);
+ vc4_reset_cl(&vc4->uniforms);
+ vc4_reset_cl(&vc4->bo_handles);
vc4_reset_cl(&vc4->bo_pointers);
vc4->shader_rec_count = 0;
More information about the mesa-commit
mailing list