If someone want to try this patch:
GALLIUM_HUD="instructions" valgrind --leak-check=yes glxgears

Thanks!

On 12/16/2015 10:54 PM, Samuel Pitoiset wrote:
This fixes a memory leak introduced in 6a9c151
("nv50: add compute-related MP perf counters on G84+")

Untested patch, but it's exactly the same code as nvc0.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Cc: "11.1" <mesa-sta...@lists.freedesktop.org>
---
  src/gallium/drivers/nouveau/nv50/nv50_screen.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c 
b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 1e4b75f..ee43d8f 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -405,6 +405,11 @@ nv50_screen_destroy(struct pipe_screen *pscreen)

     if (screen->blitter)
        nv50_blitter_destroy(screen);
+   if (screen->pm.prog) {
+      screen->pm.prog->code = NULL; /* hardcoded, don't FREE */
+      nv50_program_destroy(NULL, screen->pm.prog);
+      FREE(screen->pm.prog);
+   }

     nouveau_bo_ref(NULL, &screen->code);
     nouveau_bo_ref(NULL, &screen->tls_bo);

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to