radv: Add WSI buffers to BO list only if they can be used.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 24 Mar 2020 16:59:26 +0000 (17:59 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Apr 2020 18:01:24 +0000 (18:01 +0000)
commitcbeda7f78e36caa7e4ca775bd848e1c8d38ee5d7
treefc1b6b28ae0b5cfd119e7ad5ca01442a71834ac4
parent9a61f2a8a9ca17e2d53dded9c1c490c890aa4a74
radv: Add WSI buffers to BO list only if they can be used.

Also reverse the BO list removal loop. This way typical WSI usage
should find the entry in O(active swapchains) iterations, which
should not be a performance issues. Tested with Doom(2106) which
found the entry in 1 iteration every time.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4306>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_wsi.c