summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-04-26 12:50:11 +1000
committerDave Airlie <[email protected]>2019-04-26 12:59:43 +1000
commitd946cbe9f54a1b733e0bdec2423ae47d408114fb (patch)
treef9b4b2d9dce758bfccb56ff4cc67c17385b93763
parent529ace788762e91165f11942ea39305116b64c7a (diff)
nir: fix bit_size in lower indirect derefs.
This fixes a case where we are expecting 64-bit but generate 32-bit consts and validate gets angry. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/compiler/nir/nir_lower_indirect_derefs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c b/src/compiler/nir/nir_lower_indirect_derefs.c
index 1e1e84fb3b0..58365628885 100644
--- a/src/compiler/nir/nir_lower_indirect_derefs.c
+++ b/src/compiler/nir/nir_lower_indirect_derefs.c
@@ -51,7 +51,7 @@ emit_indirect_load_store_deref(nir_builder *b, nir_intrinsic_instr *orig_instr,
nir_deref_instr *deref = *deref_arr;
assert(deref->deref_type == nir_deref_type_array);
- nir_push_if(b, nir_ilt(b, deref->arr.index.ssa, nir_imm_int(b, mid)));
+ nir_push_if(b, nir_ilt(b, deref->arr.index.ssa, nir_imm_intN_t(b, mid, parent->dest.ssa.bit_size)));
emit_indirect_load_store_deref(b, orig_instr, parent, deref_arr,
start, mid, &then_dest, src);
nir_push_else(b, NULL);