if (ctx->primconvert)
util_primconvert_destroy(ctx->primconvert);
- slab_destroy(&ctx->transfer_pool);
+ slab_destroy_child(&ctx->transfer_pool);
for (i = 0; i < ARRAY_SIZE(ctx->pipe); i++) {
struct fd_vsc_pipe *pipe = &ctx->pipe[i];
ctx->batch = fd_bc_alloc_batch(&screen->batch_cache, ctx);
}
- slab_create(&ctx->transfer_pool, sizeof(struct fd_transfer),
- 16);
+ slab_create_child(&ctx->transfer_pool, &screen->transfer_pool);
fd_draw_init(pctx);
fd_resource_context_init(pctx);
struct primconvert_context *primconvert;
/* slab for pipe_transfer allocations: */
- struct slab_mempool transfer_pool;
+ struct slab_child_pool transfer_pool;
/* slabs for fd_hw_sample and fd_hw_sample_period allocations: */
struct slab_mempool sample_pool;
ptrans->box.x + ptrans->box.width);
pipe_resource_reference(&ptrans->resource, NULL);
- slab_free_st(&ctx->transfer_pool, ptrans);
+ slab_free(&ctx->transfer_pool, ptrans);
free(trans->staging);
}
DBG("prsc=%p, level=%u, usage=%x, box=%dx%d+%d,%d", prsc, level, usage,
box->width, box->height, box->x, box->y);
- ptrans = slab_alloc_st(&ctx->transfer_pool);
+ ptrans = slab_alloc(&ctx->transfer_pool);
if (!ptrans)
return NULL;
fd_bc_fini(&screen->batch_cache);
+ slab_destroy_parent(&screen->transfer_pool);
+
pipe_mutex_destroy(screen->lock);
free(screen);
pscreen->fence_reference = fd_screen_fence_ref;
pscreen->fence_finish = fd_screen_fence_finish;
+ slab_create_parent(&screen->transfer_pool, sizeof(struct fd_transfer), 16);
+
util_format_s3tc_init();
return pscreen;
#include "pipe/p_screen.h"
#include "util/u_memory.h"
+#include "util/slab.h"
#include "os/os_thread.h"
#include "freedreno_batch_cache.h"
/* place for winsys to stash it's own stuff: */
void *winsys_priv;
+ struct slab_parent_pool transfer_pool;
+
uint32_t gmemsize_bytes;
uint32_t device_id;
uint32_t gpu_id; /* 220, 305, etc */