llvmpipe: Plug fence leaks.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 7 Dec 2010 16:59:25 +0000 (16:59 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 9 Dec 2010 16:48:26 +0000 (16:48 +0000)
src/gallium/drivers/llvmpipe/lp_scene.c
src/gallium/drivers/llvmpipe/lp_setup.c

index 978d17c57547de9a9a4879e41298de67c0b72075..5d0f5f8b7b58f5dcb451c658f1135b46c0f8b544 100644 (file)
@@ -74,6 +74,7 @@ lp_scene_create( struct pipe_context *pipe )
 void
 lp_scene_destroy(struct lp_scene *scene)
 {
+   lp_fence_reference(&scene->fence, NULL);
    pipe_mutex_destroy(scene->mutex);
    assert(scene->data.head->next == NULL);
    FREE(scene->data.head);
index db04c84efb5a9634a853104ff9a5ea97f4afb966..5d83a1e3579b5d51390b951b51096c6406ddf16a 100644 (file)
@@ -996,6 +996,8 @@ lp_setup_destroy( struct lp_setup_context *setup )
       lp_scene_destroy(scene);
    }
 
+   lp_fence_reference(&setup->last_fence, NULL);
+
    FREE( setup );
 }