nir: Add NIR debug passes and MESA_NIR_DBG env variable to enable them
The idea is to have a collection of NIR passes which would help in debugging common issues with shaders.
Passes:
-
nir_dbg_init_undef - initializes all undefined SSAs, currently initializes them to zero. Helps in debugging of visual corruptions.
-
nir_dbg_restrain_loops - adds upper bound to all loops. Helps to find out if shader hangs due to some infinite loop.
Signed-off-by: Danylo Piliaiev danylo.piliaiev@globallogic.com