nir/print: Use src_type when printing consts in SSA uses
authorCaio Oliveira <caio.oliveira@intel.com>
Tue, 13 Jun 2023 04:59:34 +0000 (21:59 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 28 Jun 2023 20:17:18 +0000 (20:17 +0000)
commita185736a42925d9b375c13b9e94f941cba6161cb
treec94574faa1bf3ee67383eb2f8d531cb6ad704948
parent5d15f4ef28bb6b9a62cb9d8205f6cde6613f2da2
nir/print: Use src_type when printing consts in SSA uses

If the src_type is not available, untie by looking at the results from
nir_gather_ssa_types(). If that is ambiguous, just pick uint.

Now in print_const_from_load() when the type is invalid, print the full
constant form (with both padded hex and float); when the passed type
is valid, print the terse form based on it.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23562>
src/compiler/nir/nir_print.c