projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b1e4ba
)
nir/print: Use nir_src_as_int for array indices
author
Jason Ekstrand
<jason@jlekstrand.net>
Tue, 2 Apr 2019 02:36:12 +0000
(21:36 -0500)
committer
Karol Herbst
<kherbst@redhat.com>
Sun, 14 Apr 2019 20:25:56 +0000
(22:25 +0200)
Reviewed-by: Karol Herbst <kherbst@redhat.com>
src/compiler/nir/nir_print.c
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_print.c
b/src/compiler/nir/nir_print.c
index
42053dc
..
c66dab2
100644
(file)
--- 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);