radv: Use an array to store descriptor sets.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 4 Nov 2017 14:19:02 +0000 (15:19 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 4 Nov 2017 19:18:17 +0000 (20:18 +0100)
commitcecbcf4b2de9e495969b7a25ce06ba7c3fabeb6c
tree123d13fd4c7b962c82dd1e151b7b0f96a48285b8
parentb041687ed1e641a79237752a5ffe099d731e13e9
radv: Use an array to store descriptor sets.

The vram_list linked list resulted in lots of pointer chasing.
Replacing this with an array instead improves descriptor set
allocation CPU usage by 3x at least (when also considering the free),
because it had to iterate through 300-400 sets on average.

Not a huge improvement as the pre-improvement CPU usage was only
about 2.3% in the busiest thread.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_descriptor_set.c
src/amd/vulkan/radv_private.h