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/vc4 | |
parent | 761ff403024e31aacb345efaa527377894724fad (diff) |
gallium: switch drivers to the slab allocator in src/util
Diffstat (limited to 'src/gallium/drivers/vc4')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_context.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_context.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c index eeadea0b1db..a85554a43dd 100644 --- a/src/gallium/drivers/vc4/vc4_context.c +++ b/src/gallium/drivers/vc4/vc4_context.c @@ -200,7 +200,7 @@ vc4_context_destroy(struct pipe_context *pctx) if (vc4->uploader) u_upload_destroy(vc4->uploader); - util_slab_destroy(&vc4->transfer_pool); + slab_destroy(&vc4->transfer_pool); pipe_surface_reference(&vc4->framebuffer.cbufs[0], NULL); pipe_surface_reference(&vc4->framebuffer.zsbuf, NULL); @@ -246,8 +246,8 @@ vc4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) vc4->fd = screen->fd; - util_slab_create(&vc4->transfer_pool, sizeof(struct vc4_transfer), - 16, UTIL_SLAB_SINGLETHREADED); + slab_create(&vc4->transfer_pool, sizeof(struct vc4_transfer), + 16); vc4->blitter = util_blitter_create(pctx); if (!vc4->blitter) goto fail; diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h index 63a1dfbb15a..ce2c6d4e68e 100644 --- a/src/gallium/drivers/vc4/vc4_context.h +++ b/src/gallium/drivers/vc4/vc4_context.h @@ -29,7 +29,7 @@ #include "pipe/p_context.h" #include "pipe/p_state.h" -#include "util/u_slab.h" +#include "util/slab.h" #define __user #include "vc4_drm.h" @@ -238,7 +238,7 @@ struct vc4_context { bool msaa; /** @} */ - struct util_slab_mempool transfer_pool; + struct slab_mempool transfer_pool; struct blitter_context *blitter; /** bitfield of VC4_DIRTY_* */ diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index 398aa8181df..0d4bb6477d6 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -121,7 +121,7 @@ vc4_resource_transfer_unmap(struct pipe_context *pctx, } pipe_resource_reference(&ptrans->resource, NULL); - util_slab_free(&vc4->transfer_pool, ptrans); + slab_free_st(&vc4->transfer_pool, ptrans); } static struct pipe_resource * @@ -194,13 +194,13 @@ vc4_resource_transfer_map(struct pipe_context *pctx, if (usage & PIPE_TRANSFER_WRITE) rsc->writes++; - trans = util_slab_alloc(&vc4->transfer_pool); + trans = slab_alloc_st(&vc4->transfer_pool); if (!trans) return NULL; /* XXX: Handle DONTBLOCK, DISCARD_RANGE, PERSISTENT, COHERENT. */ - /* util_slab_alloc() doesn't zero: */ + /* slab_alloc_st() doesn't zero: */ memset(trans, 0, sizeof(*trans)); ptrans = &trans->base; |