radv: Add suballocation for shaders.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 12 Mar 2017 21:43:51 +0000 (22:43 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 2 Aug 2017 22:45:13 +0000 (00:45 +0200)
commitc9d4b571ad5dc3e622603a0f50d293192850d749
treecc0018db59aabf06930036208dcaa7b85a9f06c0
parentfe3d2559d941f8f69dbdb369221af69a9974d017
radv: Add suballocation for shaders.

This reduces the number of BOs that we need for the BO lists during
a submission.

Currently uses a fairly simple linear search for finding free space,
that could eventually be improved to a binary tree, which with some
per-node info could make a check for space O(1) and finding it O(log n),
in the number of buffers in that slab.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_pipeline_cache.c
src/amd/vulkan/radv_private.h