nir: Add a nir_shader_preserve_all_metadata helper
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 22 May 2020 02:37:33 +0000 (21:37 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Jun 2020 05:08:12 +0000 (05:08 +0000)
commitb0d1f9a72ff6e1c7164dc22ff5eb3e817f245d13
tree2b7ddf09899516dfb836a91262cd2c75b58de967
parente017ee95c113b3306708f54262d614cdf7440274
nir: Add a nir_shader_preserve_all_metadata helper

There are some passes which really work on the shader level and it's
easier if we have a helper which preserves metadata on the whole shader.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5171>
src/compiler/nir/nir.h
src/compiler/nir/nir_metadata.c