From 1672e8e05996d48e51a1998bd7e9b08b78e012f5 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 18 Sep 2008 11:10:09 +0900 Subject: pipebuffer: New callback to flush all temporary-held buffers. Used mostly to aid debugging memory issues or to clean up resources when the drivers are long lived. --- src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c') diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c index 20fc87b39d..1bf22a2ec0 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c @@ -129,7 +129,7 @@ pb_malloc_buffer_create(size_t size, static struct pb_buffer * -pb_malloc_buffer_create_buffer(struct pb_manager *mgr, +pb_malloc_bufmgr_create_buffer(struct pb_manager *mgr, size_t size, const struct pb_desc *desc) { @@ -137,6 +137,13 @@ pb_malloc_buffer_create_buffer(struct pb_manager *mgr, } +static void +pb_malloc_bufmgr_flush(struct pb_manager *mgr) +{ + /* No-op */ +} + + static void pb_malloc_bufmgr_destroy(struct pb_manager *mgr) { @@ -146,8 +153,9 @@ pb_malloc_bufmgr_destroy(struct pb_manager *mgr) static struct pb_manager pb_malloc_bufmgr = { - pb_malloc_buffer_create_buffer, - pb_malloc_bufmgr_destroy + pb_malloc_bufmgr_destroy, + pb_malloc_bufmgr_create_buffer, + pb_malloc_bufmgr_flush }; -- cgit v1.2.3