summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_context.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-06-07 13:11:49 +0800
committerChia-I Wu <[email protected]>2013-06-07 13:23:43 +0800
commit7142da6dd1b12f203a7daaa7d79235da8b5bc721 (patch)
tree938892e0fef57d277b38307f337b71d33210d113 /src/gallium/drivers/ilo/ilo_context.c
parent09f62a13fcddd237e7a3aef6185377f9a585a332 (diff)
ilo: use slab allocator for transfers
Slab allocator is perfect for transfer. Improved OpenArena performance by 1% with several casual runs.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_context.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_context.c b/src/gallium/drivers/ilo/ilo_context.c
index a3b1c5e4d92..46d360a7b4a 100644
--- a/src/gallium/drivers/ilo/ilo_context.c
+++ b/src/gallium/drivers/ilo/ilo_context.c
@@ -96,6 +96,8 @@ ilo_context_destroy(struct pipe_context *pipe)
if (ilo->last_cp_bo)
ilo->last_cp_bo->unreference(ilo->last_cp_bo);
+ util_slab_destroy(&ilo->transfer_mempool);
+
if (ilo->blitter)
util_blitter_destroy(ilo->blitter);
if (ilo->hw3d)
@@ -134,6 +136,9 @@ ilo_context_create(struct pipe_screen *screen, void *priv)
ilo_cp_set_flush_callback(ilo->cp,
ilo_context_cp_flushed, (void *) ilo);
+ util_slab_create(&ilo->transfer_mempool,
+ sizeof(struct ilo_transfer), 64, UTIL_SLAB_SINGLETHREADED);
+
ilo->dirty = ILO_DIRTY_ALL;
ilo->base.screen = screen;