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/virgl | |
parent | 761ff403024e31aacb345efaa527377894724fad (diff) |
gallium: switch drivers to the slab allocator in src/util
Diffstat (limited to 'src/gallium/drivers/virgl')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_buffer.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/virgl/virgl_texture.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c index 153df8dd0c9..de997962845 100644 --- a/src/gallium/drivers/virgl/virgl_buffer.c +++ b/src/gallium/drivers/virgl/virgl_buffer.c @@ -62,7 +62,7 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx, if (doflushwait) ctx->flush(ctx, NULL, 0); - trans = util_slab_alloc(&vctx->texture_transfer_pool); + trans = slab_alloc_st(&vctx->texture_transfer_pool); if (!trans) return NULL; @@ -114,7 +114,7 @@ static void virgl_buffer_transfer_unmap(struct pipe_context *ctx, } } - util_slab_free(&vctx->texture_transfer_pool, trans); + slab_free_st(&vctx->texture_transfer_pool, trans); } static void virgl_buffer_transfer_flush_region(struct pipe_context *ctx, diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 1bd7f3b6b52..a6c05975986 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -32,7 +32,7 @@ #include "util/u_format.h" #include "util/u_transfer.h" #include "util/u_helpers.h" -#include "util/u_slab.h" +#include "util/slab.h" #include "util/u_upload_mgr.h" #include "util/u_blitter.h" #include "tgsi/tgsi_text.h" @@ -862,7 +862,7 @@ virgl_context_destroy( struct pipe_context *ctx ) u_upload_destroy(vctx->uploader); util_primconvert_destroy(vctx->primconvert); - util_slab_destroy(&vctx->texture_transfer_pool); + slab_destroy(&vctx->texture_transfer_pool); FREE(vctx); } @@ -943,8 +943,8 @@ struct pipe_context *virgl_context_create(struct pipe_screen *pscreen, virgl_init_so_functions(vctx); list_inithead(&vctx->to_flush_bufs); - util_slab_create(&vctx->texture_transfer_pool, sizeof(struct virgl_transfer), - 16, UTIL_SLAB_SINGLETHREADED); + slab_create(&vctx->texture_transfer_pool, sizeof(struct virgl_transfer), + 16); vctx->primconvert = util_primconvert_create(&vctx->base, rs->caps.caps.v1.prim_mask); vctx->uploader = u_upload_create(&vctx->base, 1024 * 1024, diff --git a/src/gallium/drivers/virgl/virgl_context.h b/src/gallium/drivers/virgl/virgl_context.h index adb8adef33c..3b9901f7e11 100644 --- a/src/gallium/drivers/virgl/virgl_context.h +++ b/src/gallium/drivers/virgl/virgl_context.h @@ -25,7 +25,7 @@ #include "pipe/p_state.h" #include "pipe/p_context.h" -#include "util/u_slab.h" +#include "util/slab.h" #include "util/list.h" struct pipe_screen; @@ -56,7 +56,7 @@ struct virgl_context { struct pipe_framebuffer_state framebuffer; - struct util_slab_mempool texture_transfer_pool; + struct slab_mempool texture_transfer_pool; struct pipe_index_buffer index_buffer; struct u_upload_mgr *uploader; diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c index 64b6744462d..24bbc3ce60b 100644 --- a/src/gallium/drivers/virgl/virgl_texture.c +++ b/src/gallium/drivers/virgl/virgl_texture.c @@ -145,7 +145,7 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx, if (doflushwait) ctx->flush(ctx, NULL, 0); - trans = util_slab_alloc(&vctx->texture_transfer_pool); + trans = slab_alloc_st(&vctx->texture_transfer_pool); if (!trans) return NULL; @@ -235,7 +235,7 @@ static void virgl_texture_transfer_unmap(struct pipe_context *ctx, if (trans->resolve_tmp) pipe_resource_reference((struct pipe_resource **)&trans->resolve_tmp, NULL); - util_slab_free(&vctx->texture_transfer_pool, trans); + slab_free_st(&vctx->texture_transfer_pool, trans); } |