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/ilo/shader | |
parent | 761ff403024e31aacb345efaa527377894724fad (diff) |
gallium: switch drivers to the slab allocator in src/util
Diffstat (limited to 'src/gallium/drivers/ilo/shader')
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_compiler.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_compiler.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/ilo/shader/toy_compiler.c b/src/gallium/drivers/ilo/shader/toy_compiler.c index 99f1ad1505f..4651c836b90 100644 --- a/src/gallium/drivers/ilo/shader/toy_compiler.c +++ b/src/gallium/drivers/ilo/shader/toy_compiler.c @@ -491,9 +491,9 @@ toy_compiler_cleanup(struct toy_compiler *tc) struct toy_inst *inst, *next; LIST_FOR_EACH_ENTRY_SAFE(inst, next, &tc->instructions, list) - util_slab_free(&tc->mempool, inst); + slab_free_st(&tc->mempool, inst); - util_slab_destroy(&tc->mempool); + slab_destroy(&tc->mempool); } /** @@ -543,8 +543,8 @@ toy_compiler_init(struct toy_compiler *tc, const struct ilo_dev *dev) tc_init_inst_templ(tc); - util_slab_create(&tc->mempool, sizeof(struct toy_inst), - 64, UTIL_SLAB_SINGLETHREADED); + slab_create(&tc->mempool, sizeof(struct toy_inst), + 64); list_inithead(&tc->instructions); /* instructions are added to the tail */ diff --git a/src/gallium/drivers/ilo/shader/toy_compiler.h b/src/gallium/drivers/ilo/shader/toy_compiler.h index d9b56174baf..71f9deaa726 100644 --- a/src/gallium/drivers/ilo/shader/toy_compiler.h +++ b/src/gallium/drivers/ilo/shader/toy_compiler.h @@ -29,7 +29,7 @@ #define TOY_COMPILER_H #include "genhw/genhw.h" -#include "util/u_slab.h" +#include "util/slab.h" #include "ilo_common.h" #include "toy_compiler_reg.h" @@ -153,7 +153,7 @@ struct toy_compiler { const struct ilo_dev *dev; struct toy_inst templ; - struct util_slab_mempool mempool; + struct slab_mempool mempool; struct list_head instructions; struct list_head *iter, *iter_next; @@ -209,7 +209,7 @@ tc_duplicate_inst(struct toy_compiler *tc, const struct toy_inst *inst) { struct toy_inst *new_inst; - new_inst = util_slab_alloc(&tc->mempool); + new_inst = slab_alloc_st(&tc->mempool); if (!new_inst) return NULL; @@ -236,7 +236,7 @@ static inline void tc_discard_inst(struct toy_compiler *tc, struct toy_inst *inst) { list_del(&inst->list); - util_slab_free(&tc->mempool, inst); + slab_free_st(&tc->mempool, inst); } /** |