pool_destroy(struct zink_screen *screen, struct zink_descriptor_pool *pool)
{
VKSCR(DestroyDescriptorPool)(screen->dev, pool->pool, NULL);
- ralloc_free(pool);
+ FREE(pool);
}
static void
{
if (mpool->pool)
pool_destroy(screen, mpool->pool);
- ralloc_free(mpool);
+ FREE(mpool);
}
static bool
static struct zink_descriptor_pool *
alloc_new_pool(struct zink_screen *screen, struct zink_descriptor_pool_multi *mpool)
{
- struct zink_descriptor_pool *pool = rzalloc(mpool, struct zink_descriptor_pool);
+ struct zink_descriptor_pool *pool = CALLOC_STRUCT(zink_descriptor_pool);
if (!pool)
return NULL;
const unsigned num_type_sizes = mpool->pool_key->sizes[1].descriptorCount ? 2 : 1;
pool->pool = create_pool(screen, num_type_sizes, mpool->pool_key->sizes, 0);
if (!pool->pool) {
- ralloc_free(pool);
+ FREE(pool);
return NULL;
}
return pool;
static struct zink_descriptor_pool *
create_push_pool(struct zink_screen *screen, struct zink_batch_state *bs, bool is_compute, bool has_fbfetch)
{
- struct zink_descriptor_pool *pool = rzalloc(bs, struct zink_descriptor_pool);
+ struct zink_descriptor_pool *pool = CALLOC_STRUCT(zink_descriptor_pool);
VkDescriptorPoolSize sizes[2];
sizes[0].type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
if (is_compute)
NULL;
if (mppool && *mppool)
return check_pool_alloc(ctx, *mppool, pg, type, bs, is_compute);
- struct zink_descriptor_pool_multi *mpool = rzalloc(bs, struct zink_descriptor_pool_multi);
+ struct zink_descriptor_pool_multi *mpool = CALLOC_STRUCT(zink_descriptor_pool_multi);
if (!mpool)
return NULL;
- util_dynarray_init(&mpool->overflowed_pools[0], mpool);
- util_dynarray_init(&mpool->overflowed_pools[1], mpool);
+ util_dynarray_init(&mpool->overflowed_pools[0], NULL);
+ util_dynarray_init(&mpool->overflowed_pools[1], NULL);
mpool->pool_key = pool_key;
if (!set_pool(bs, pg, mpool, type)) {
multi_pool_destroy(screen, mpool);