nir: Add a preamble optimization pass

This pass tries to move computations that are uniform for the entire
draw to the preamble. There's also an API for backends to insert their
own instructions into the preamble, for porting existing UBO pushing
passes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13148>
This commit is contained in:
Connor Abbott
2021-09-24 18:41:29 +02:00
committed by Marge Bot
parent 31221ee556
commit 3b96ad70ee
3 changed files with 644 additions and 0 deletions

View File

@@ -244,6 +244,7 @@ files_libnir = files(
'nir_opt_offsets.c',
'nir_opt_peephole_select.c',
'nir_opt_phi_precision.c',
'nir_opt_preamble.c',
'nir_opt_ray_queries.c',
'nir_opt_rematerialize_compares.c',
'nir_opt_remove_phis.c',