spirv: Use NIR_PASS for spirv2nir --optimize
authorCaio Oliveira <caio.oliveira@intel.com>
Fri, 28 Apr 2023 16:46:10 +0000 (09:46 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 11 May 2023 19:53:17 +0000 (19:53 +0000)
commitd3bdddcf2ae4d00719f4ade1ecd062784c0bea7e
treef49d1f31ce4ec2d1b5971d8606f514ce529efcec
parentf4c48326892a976abc246620e51fa28c46bb2408
spirv: Use NIR_PASS for spirv2nir --optimize

This allows us to use NIR_DEBUG=print to see each step.
Also use an OPT macro to make code slightly more readable.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22764>
src/compiler/spirv/spirv2nir.c