diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-09-18 19:06:20 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-09-18 19:07:33 +0100 |
commit | a8d1521f30766b6a4707aa9966e1f2f9c0b3ac00 (patch) | |
tree | 3d457d02a4d6167c2b720f8b55a59a32f33aaed9 /src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c | |
parent | 89ab66448e1bcd78caab6678261c2885dcff741c (diff) | |
parent | 0b8e19ffc51c29543796d4f1e3243e97d8c32671 (diff) |
Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:
src/mesa/shader/slang/slang_link.c
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c')
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c index 8698c4cff6..2a80154920 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c @@ -407,6 +407,17 @@ pb_slab_manager_create_buffer(struct pb_manager *_mgr, static void +pb_slab_manager_flush(struct pb_manager *_mgr) +{ + struct pb_slab_manager *mgr = pb_slab_manager(_mgr); + + assert(mgr->provider->flush); + if(mgr->provider->flush) + mgr->provider->flush(mgr->provider); +} + + +static void pb_slab_manager_destroy(struct pb_manager *_mgr) { struct pb_slab_manager *mgr = pb_slab_manager(_mgr); @@ -430,6 +441,7 @@ pb_slab_manager_create(struct pb_manager *provider, mgr->base.destroy = pb_slab_manager_destroy; mgr->base.create_buffer = pb_slab_manager_create_buffer; + mgr->base.flush = pb_slab_manager_flush; mgr->provider = provider; mgr->bufSize = bufSize; @@ -466,6 +478,19 @@ pb_slab_range_manager_create_buffer(struct pb_manager *_mgr, static void +pb_slab_range_manager_flush(struct pb_manager *_mgr) +{ + struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr); + + /* Individual slabs don't hold any temporary buffers so no need to call them */ + + assert(mgr->provider->flush); + if(mgr->provider->flush) + mgr->provider->flush(mgr->provider); +} + + +static void pb_slab_range_manager_destroy(struct pb_manager *_mgr) { struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr); @@ -499,6 +524,7 @@ pb_slab_range_manager_create(struct pb_manager *provider, mgr->base.destroy = pb_slab_range_manager_destroy; mgr->base.create_buffer = pb_slab_range_manager_create_buffer; + mgr->base.flush = pb_slab_range_manager_flush; mgr->provider = provider; mgr->minBufSize = minBufSize; |