zink: apply Delete All The Code methodology to the ubo/ssbo variables
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 4 Dec 2020 20:43:19 +0000 (15:43 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 17 Mar 2021 01:27:00 +0000 (01:27 +0000)
commitc1cdf30a119cc523616b3825daf144c1620c17b7
tree1847398c71d613f4051d7a6b178ad10b57bf08f7
parent769c6dce2321c8ff7018c8fface16709d3123670
zink: apply Delete All The Code methodology to the ubo/ssbo variables

gallium rewrites all the ubo/ssbo instructions to use the buffer index as
the instruction src. the nir variables which are passed to zink after that
point are completely worthless, and it's impossible to accurately determine
which one corresponds to which buffer

thus, deleting all the variables and creating new ones based on the buffers
that are used is the best option, and it also enables simplifying a ton
of code as well as doing even better improvements in the future

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624>
src/gallium/drivers/zink/nir_lower_dynamic_bo_access.c
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
src/gallium/drivers/zink/zink_compiler.c