Commit d946cbe9 authored by Dave Airlie's avatar Dave Airlie
Browse files

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's avatarJason Ekstrand <jason@jlekstrand.net>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 529ace78
...@@ -51,7 +51,7 @@ emit_indirect_load_store_deref(nir_builder *b, nir_intrinsic_instr *orig_instr, ...@@ -51,7 +51,7 @@ emit_indirect_load_store_deref(nir_builder *b, nir_intrinsic_instr *orig_instr,
nir_deref_instr *deref = *deref_arr; nir_deref_instr *deref = *deref_arr;
assert(deref->deref_type == nir_deref_type_array); 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, emit_indirect_load_store_deref(b, orig_instr, parent, deref_arr,
start, mid, &then_dest, src); start, mid, &then_dest, src);
nir_push_else(b, NULL); nir_push_else(b, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment