zink: rework cached fbfetch descriptor fallback
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 4 Nov 2021 15:24:05 +0000 (11:24 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 5 Nov 2021 02:21:01 +0000 (02:21 +0000)
commit8c37cd8860c997e04fd3c0a6b1d6888558844449
tree2824e5b94b35e6830e190b2fbc1d7b970e377696
parent2d1f5e3dcb3d3f32acd69429aa38e2ecac93956c
zink: rework cached fbfetch descriptor fallback

this ended up being a little trickier than I thought; lazy
descriptors don't use dynamic ubo types for the push set,
which means drivers that (correctly) assert dynamic offset existence
explode because the descriptor template will never work with the
push set

the better, though slightly more annoying, option here is to use the
lazy manager's faster descriptor allocation and lesser complexity to
quickly grab a push set, then tweak the existing cached codepath slightly
in order to update a raw vkdescriptorset

Fixes: 417477f60ed ("zink: always use lazy (non-push) updating for fbfetch descriptors")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13677>
src/gallium/drivers/zink/zink_descriptors.c
src/gallium/drivers/zink/zink_descriptors.h
src/gallium/drivers/zink/zink_descriptors_lazy.c