nir: Print array deref indices as decimal
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 26 Jun 2019 11:41:20 +0000 (13:41 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 29 Jul 2019 09:36:19 +0000 (11:36 +0200)
We print the size as decimal too, and using hex without a leading "0x"
was very confusing.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_print.c

index 9633cb37ac7542866766cb9d28d6a9701b24c3c1..4e144c1c955578457a213789d8430944da000f2d 100644 (file)
@@ -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);