zink: start using per-stage flags for new shaders, refcount shader modules
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 30 Jun 2020 13:57:19 +0000 (09:57 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 7 Aug 2020 12:36:59 +0000 (12:36 +0000)
commitc312299316cc97d86d5ca642c6b4d502f9a3ff73
tree6fa4f54620c9007d08b8c14a46cb68d9cf260afb
parent76d3645dd2e1737ecac3244d687d0eadab8456d2
zink: start using per-stage flags for new shaders, refcount shader modules

we don't want to recompile shaders if we don't have to, so we can set bitflags
upon receiving new shader states and then compile only the stages that have
changed while refcounting the unchanged stages

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_context.h
src/gallium/drivers/zink/zink_draw.c
src/gallium/drivers/zink/zink_pipeline.c
src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_program.h