if (vc4->uploader)
u_upload_destroy(vc4->uploader);
- slab_destroy(&vc4->transfer_pool);
+ slab_destroy_child(&vc4->transfer_pool);
pipe_surface_reference(&vc4->framebuffer.cbufs[0], NULL);
pipe_surface_reference(&vc4->framebuffer.zsbuf, NULL);
vc4->fd = screen->fd;
- slab_create(&vc4->transfer_pool, sizeof(struct vc4_transfer),
- 16);
+ slab_create_child(&vc4->transfer_pool, &screen->transfer_pool);
vc4->blitter = util_blitter_create(pctx);
if (!vc4->blitter)
goto fail;
*/
struct hash_table *write_jobs;
- struct slab_mempool transfer_pool;
+ struct slab_child_pool transfer_pool;
struct blitter_context *blitter;
/** bitfield of VC4_DIRTY_* */
}
pipe_resource_reference(&ptrans->resource, NULL);
- slab_free_st(&vc4->transfer_pool, ptrans);
+ slab_free(&vc4->transfer_pool, ptrans);
}
static struct pipe_resource *
if (usage & PIPE_TRANSFER_WRITE)
rsc->writes++;
- trans = slab_alloc_st(&vc4->transfer_pool);
+ trans = slab_alloc(&vc4->transfer_pool);
if (!trans)
return NULL;
util_hash_table_destroy(screen->bo_handles);
vc4_bufmgr_destroy(pscreen);
+ slab_destroy_parent(&screen->transfer_pool);
close(screen->fd);
ralloc_free(pscreen);
}
if (!vc4_get_chip_info(screen))
goto fail;
+ slab_create_parent(&screen->transfer_pool, sizeof(struct vc4_transfer), 16);
+
vc4_fence_init(screen);
vc4_debug = debug_get_option_vc4_debug();
#include "os/os_thread.h"
#include "state_tracker/drm_driver.h"
#include "util/list.h"
+#include "util/slab.h"
struct vc4_bo;
*/
uint64_t finished_seqno;
+ struct slab_parent_pool transfer_pool;
+
struct vc4_bo_cache {
/** List of struct vc4_bo freed, by age. */
struct list_head time_list;