Displaying 3 results from an estimated 3 matches for "draw_destroy".
2009 Dec 21
2
[PATCH 1/2] Unreference state/buffer objects on context/screen destruction
...e.programs)
+ so_ref(NULL, &nv50->state.programs);
+ if (nv50->state.vtxfmt)
+ so_ref(NULL, &nv50->state.vtxfmt);
+ if (nv50->state.vtxbuf)
+ so_ref(NULL, &nv50->state.vtxbuf);
+ if (nv50->state.vtxattr)
+ so_ref(NULL, &nv50->state.vtxattr);
+
draw_destroy(nv50->draw);
FREE(nv50);
}
Index: nv40/nv40_screen.c
===================================================================
--- nv40/nv40_screen.c (wersja 32083)
+++ nv40/nv40_screen.c (kopia robocza)
@@ -140,7 +140,13 @@
nv40_screen_destroy(struct pipe_screen *pscreen)
{
struct nv40_sc...
2009 Dec 21
1
Clean up of nv40_context->state.hw and nv40_screen->state
...5,7 +25,13 @@
nv40_destroy(struct pipe_context *pipe)
{
struct nv40_context *nv40 = nv40_context(pipe);
+ unsigned i;
+ for (i = 0; i < NV40_STATE_MAX; i++) {
+ if (nv40->state.hw[i])
+ so_ref(NULL, &nv40->state.hw[i]);
+ }
+
if (nv40->draw)
draw_destroy(nv40->draw);
FREE(nv40);
Is this the correct approach or did I miss where those objects are
unreferenced?
Best regards,
Krzysztof
2014 Jun 18
1
[PATCH 1/2] nv30: plug some memory leaks on screen destroy and shader compile
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
src/gallium/drivers/nouveau/nv30/nv30_screen.c | 6 ++++++
src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index