diff options
author | Jason Ekstrand <[email protected]> | 2019-04-01 21:36:12 -0500 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-04-14 22:25:56 +0200 |
commit | 10602db78cae1b86aca4d9b8b7303537521a713d (patch) | |
tree | 05174361c0913933a059f9517ae4b76401f7a235 /src/compiler | |
parent | 9b1e4bab6bb3be7a5dad910b10a28db0a4bb8b5f (diff) |
nir/print: Use nir_src_as_int for array indices
Reviewed-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_print.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 42053dc2d8c..c66dab2843a 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -637,9 +637,8 @@ 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: { - nir_const_value *const_index = nir_src_as_const_value(instr->arr.index); - if (const_index) { - fprintf(fp, "[%u]", const_index->u32[0]); + if (nir_src_is_const(instr->arr.index)) { + fprintf(fp, "[%"PRIx64"]", nir_src_as_int(instr->arr.index)); } else { fprintf(fp, "["); print_src(&instr->arr.index, state); |