gallium/pipebuffer: add pb_slab utility
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 6 Sep 2016 12:43:00 +0000 (14:43 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 27 Sep 2016 14:44:42 +0000 (16:44 +0200)
commit84f156c0cbf0deb0f51163dc3fd6b09a62270c50
treed3473348930a8d87361aaf86d25931086881bb29
parentb3ebc229dcd5d1cc882443f9b851890b00cd9dbc
gallium/pipebuffer: add pb_slab utility

This is a simple framework for slab allocation from buffers that fits into
the buffer management scheme of the radeon and amdgpu winsyses where bufmgrs
aren't used.

The utility knows about different sized allocations and explicitly manages
reclaim of allocations that have pending fences. It manages all the free lists
but does not actually touch buffer objects directly, relying on callbacks for
that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/Makefile.sources
src/gallium/auxiliary/pipebuffer/pb_slab.c [new file with mode: 0644]
src/gallium/auxiliary/pipebuffer/pb_slab.h [new file with mode: 0644]