tu: Rewrite border color handling
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 12 Mar 2020 11:39:16 +0000 (12:39 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Mar 2020 13:17:54 +0000 (13:17 +0000)
commit3349fe9a26d10a2d06c3f4a8ad0e5b554da2a243
tree1bb01fe9886caa1fef82ffcfd4111bd44a8f7f9b
parentf6dad10d0474cc80228636d6deb45b6025583566
tu: Rewrite border color handling

Emit a single table of all possible Vulkan border colors up front, and
then index into it using the Vulkan enum directly. In fact this seems to
be the entire point of separating out border colors in the first place.

In addition to being simpler and having less CPU overhead, and fixing
cases where more than one sampler uses border color, this paves the way
for bindless samplers because the existing approach isn't great for
bindless.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4200>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4200>
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_descriptor_set.c
src/freedreno/vulkan/tu_descriptor_set.h
src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_private.h