st/mesa: enable state var merging to improve fetch_state performance
authorMarek Olšák <marek.olsak@amd.com>
Mon, 23 Nov 2020 04:30:57 +0000 (23:30 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 Jan 2021 21:59:30 +0000 (21:59 +0000)
commit81f7cb149da21b648d2305094bf542b3564cab56
treec4b7bd74e4b2ff74b19067f22690d39efcd4d5ca
parentfd6ce2be9048f112c94ee288baea02b46c0ea4cd
st/mesa: enable state var merging to improve fetch_state performance

The requirement is that drivers must implement finalize_nir for
st_finalize_nir to be invoked at link time and before shader variant
generation. Without that, _mesa_optimize_state_parameters won't be called.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183>
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_nir.h
src/mesa/state_tracker/st_program.c