summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorYounes Manton <younes.m@gmail.com>2009-12-28 17:33:34 -0500
committerYounes Manton <younes.m@gmail.com>2009-12-28 17:59:01 -0500
commit85dcc070719ef6a6bcf65dc4996b1733f63912d8 (patch)
tree909e191a4b44987761756c53514cdc950ce4ea14 /src/gallium/drivers/nouveau
parentcb9214f33030e1f482d59049c239f20061d24ad8 (diff)
nouveau: Unreference state/buffer objects on context/screen destruction.
- unreference state objects so that buffer objects are unreferenced and eventually destroyed - free channel at screen's destruction Based on Krzysztof Smiechowicz's patch.
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index e4cf91c005..0437af3725 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -31,7 +31,7 @@ nouveau_screen_bo_skel(struct pipe_screen *pscreen, struct nouveau_bo *bo,
unsigned alignment, unsigned usage, unsigned size)
{
struct pipe_buffer *pb;
-
+
pb = CALLOC(1, sizeof(struct pipe_buffer)+sizeof(struct nouveau_bo *));
if (!pb) {
nouveau_bo_ref(NULL, &bo);
@@ -239,5 +239,6 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
void
nouveau_screen_fini(struct nouveau_screen *screen)
{
+ nouveau_channel_free(&screen->channel);
}