diff options
author | Marek Olšák <[email protected]> | 2016-08-28 11:05:14 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-06 14:24:04 +0200 |
commit | e7a73b75a0dbd599187b8980b2e1e1cb5dfdaf6d (patch) | |
tree | 4be0121e5c819988b8dbba24eebf8e6c8cdf1e55 /src/gallium/drivers/radeon | |
parent | 761ff403024e31aacb345efaa527377894724fad (diff) |
gallium: switch drivers to the slab allocator in src/util
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 6a55de1fe29..a600793e3e6 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -283,7 +283,7 @@ static void *r600_buffer_get_transfer(struct pipe_context *ctx, unsigned offset) { struct r600_common_context *rctx = (struct r600_common_context*)ctx; - struct r600_transfer *transfer = util_slab_alloc(&rctx->pool_transfers); + struct r600_transfer *transfer = slab_alloc_st(&rctx->pool_transfers); transfer->transfer.resource = resource; transfer->transfer.level = level; @@ -468,7 +468,7 @@ static void r600_buffer_transfer_unmap(struct pipe_context *ctx, if (rtransfer->staging) r600_resource_reference(&rtransfer->staging, NULL); - util_slab_free(&rctx->pool_transfers, transfer); + slab_free_st(&rctx->pool_transfers, transfer); } void r600_buffer_subdata(struct pipe_context *ctx, diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 825e4e98658..6d7cc1b5d3c 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -431,9 +431,8 @@ bool r600_common_context_init(struct r600_common_context *rctx, struct r600_common_screen *rscreen, unsigned context_flags) { - util_slab_create(&rctx->pool_transfers, - sizeof(struct r600_transfer), 64, - UTIL_SLAB_SINGLETHREADED); + slab_create(&rctx->pool_transfers, + sizeof(struct r600_transfer), 64); rctx->screen = rscreen; rctx->ws = rscreen->ws; @@ -533,7 +532,7 @@ void r600_common_context_cleanup(struct r600_common_context *rctx) u_upload_destroy(rctx->uploader); } - util_slab_destroy(&rctx->pool_transfers); + slab_destroy(&rctx->pool_transfers); if (rctx->allocator_zeroed_memory) { u_suballocator_destroy(rctx->allocator_zeroed_memory); diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index aa40a54f43d..d9f22e49889 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -39,7 +39,7 @@ #include "util/u_blitter.h" #include "util/list.h" #include "util/u_range.h" -#include "util/u_slab.h" +#include "util/slab.h" #include "util/u_suballoc.h" #include "util/u_transfer.h" @@ -527,7 +527,7 @@ struct r600_common_context { struct u_upload_mgr *uploader; struct u_suballocator *allocator_zeroed_memory; - struct util_slab_mempool pool_transfers; + struct slab_mempool pool_transfers; /* Current unaccounted memory usage. */ uint64_t vram; |