zink: unspaghettify some program update code
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 6 Sep 2022 16:35:43 +0000 (12:35 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 26 Sep 2022 17:12:31 +0000 (17:12 +0000)
commit7336580408af8988cbe1ee61ae080076feecca19
treec265ec8df01950deb7f680018fc75dd08b76a9eb
parent809e9462ce35b94eefa7a6cf5a2f41317f199ae8
zink: unspaghettify some program update code

the initial implementation of optimal_keys was added inline, but really
it's an entirely different codepath. by separating these out, it makes the
code more readable, and it also allows for slightly better optimization of
of the optimal_keys codepath

~4-5% improvement for drawoverhead -test 7

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18786>
src/gallium/drivers/zink/zink_draw.cpp
src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_program.h