From: Connor Abbott Date: Wed, 26 Jun 2019 11:41:20 +0000 (+0200) Subject: nir: Print array deref indices as decimal X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6543efe7a151d38854686b15b8d4412697d1794;p=mesa.git nir: Print array deref indices as decimal We print the size as decimal too, and using hex without a leading "0x" was very confusing. Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 9633cb37ac7..4e144c1c955 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -653,7 +653,7 @@ print_deref_link(const nir_deref_instr *instr, bool whole_chain, print_state *st case nir_deref_type_array: case nir_deref_type_ptr_as_array: { if (nir_src_is_const(instr->arr.index)) { - fprintf(fp, "[%"PRIx64"]", nir_src_as_int(instr->arr.index)); + fprintf(fp, "[%"PRId64"]", nir_src_as_int(instr->arr.index)); } else { fprintf(fp, "["); print_src(&instr->arr.index, state);