summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-09-18 11:10:09 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-09-18 12:26:19 +0900
commit1672e8e05996d48e51a1998bd7e9b08b78e012f5 (patch)
tree2ca4784cd78a276692e8581fd29481a41ac0b944 /src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
parenta06d38a74e865a0373a7314aad26b25c27ef8c57 (diff)
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.
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c14
1 files changed, 11 insertions, 3 deletions
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)
{
@@ -138,6 +138,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)
{
/* No-op */
@@ -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
};