zink: add a second descriptor manager
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 4 Jan 2021 18:34:13 +0000 (13:34 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Jun 2021 23:29:19 +0000 (23:29 +0000)
commitbfdd1d8d890d682947e067108dea9ef5f7250991
tree61cc0dff19ad5402dab3e4e0ef8860d41260dcda
parent80bf7bdcef67c19ceef64749f19e1b5c3415b837
zink: add a second descriptor manager

this is the "lazy" descriptor manager, which aims to perform the least
amount of work calculating updates while ignoring the overhead that an
update may incur: effectively the inverse of the caching manager

in this initial implementation, divergence exists between the descriptor
layouts of the cached manager and the lazy manager in order to avoid
incurring regressions in the existing descriptor architecture; this will
be reconciled in a followup MR that refactors and unifies descriptor layouts

during this interim period and until such reconciliation occurs,
the default descriptor manager is now the lazy manager for testing purposes as
there are no changes here which can affect the existing infrastructure

the caching descriptor manager can be selected with the ZINK_CACHE_DESCRIPTORS
env var and will be automatically used for vulkan drivers which don't support
the features required for lazy mode (templates)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11093>
src/gallium/drivers/zink/meson.build
src/gallium/drivers/zink/zink_compiler.c
src/gallium/drivers/zink/zink_compiler.h
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_descriptors.c
src/gallium/drivers/zink/zink_descriptors.h
src/gallium/drivers/zink/zink_descriptors_lazy.c [new file with mode: 0644]
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_screen.h