summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.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_bufmgr_mm.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_bufmgr_mm.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
index e8c7f8e1f8..fe80ca30ee 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
@@ -200,6 +200,13 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
static void
+mm_bufmgr_flush(struct pb_manager *mgr)
+{
+ /* No-op */
+}
+
+
+static void
mm_bufmgr_destroy(struct pb_manager *mgr)
{
struct mm_pb_manager *mm = mm_pb_manager(mgr);
@@ -230,8 +237,9 @@ mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
if (!mm)
return NULL;
- mm->base.create_buffer = mm_bufmgr_create_buffer;
mm->base.destroy = mm_bufmgr_destroy;
+ mm->base.create_buffer = mm_bufmgr_create_buffer;
+ mm->base.flush = mm_bufmgr_flush;
mm->size = size;
mm->align2 = align2; /* 64-byte alignment */