unsigned offset)
{
struct r600_common_context *rctx = (struct r600_common_context*)ctx;
- struct r600_transfer *transfer = slab_alloc_st(&rctx->pool_transfers);
+ struct r600_transfer *transfer = slab_alloc(&rctx->pool_transfers);
transfer->transfer.resource = resource;
transfer->transfer.level = level;
if (rtransfer->staging)
r600_resource_reference(&rtransfer->staging, NULL);
- slab_free_st(&rctx->pool_transfers, transfer);
+ slab_free(&rctx->pool_transfers, transfer);
}
void r600_buffer_subdata(struct pipe_context *ctx,
struct r600_common_screen *rscreen,
unsigned context_flags)
{
- slab_create(&rctx->pool_transfers,
- sizeof(struct r600_transfer), 64);
+ slab_create_child(&rctx->pool_transfers, &rscreen->pool_transfers);
rctx->screen = rscreen;
rctx->ws = rscreen->ws;
u_upload_destroy(rctx->uploader);
}
- slab_destroy(&rctx->pool_transfers);
+ slab_destroy_child(&rctx->pool_transfers);
if (rctx->allocator_zeroed_memory) {
u_suballocator_destroy(rctx->allocator_zeroed_memory);
rscreen->chip_class = rscreen->info.chip_class;
rscreen->debug_flags = debug_get_flags_option("R600_DEBUG", common_debug_options, 0);
+ slab_create_parent(&rscreen->pool_transfers, sizeof(struct r600_transfer), 64);
+
rscreen->force_aniso = MIN2(16, debug_get_num_option("R600_TEX_ANISO", -1));
if (rscreen->force_aniso >= 0) {
printf("radeon: Forcing anisotropy filter to %ix\n",
pipe_mutex_destroy(rscreen->aux_context_lock);
rscreen->aux_context->destroy(rscreen->aux_context);
+ slab_destroy_parent(&rscreen->pool_transfers);
+
rscreen->ws->destroy(rscreen->ws);
FREE(rscreen);
}
bool has_cp_dma;
bool has_streamout;
+ struct slab_parent_pool pool_transfers;
+
/* Texture filter settings. */
int force_aniso; /* -1 = disabled */
struct u_upload_mgr *uploader;
struct u_suballocator *allocator_zeroed_memory;
- struct slab_mempool pool_transfers;
+ struct slab_child_pool pool_transfers;
/* Current unaccounted memory usage. */
uint64_t vram;