This fixes a case where we are expecting 64-bit but generate
32-bit consts and validate gets angry.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
nir_deref_instr *deref = *deref_arr;
assert(deref->deref_type == nir_deref_type_array);
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);
emit_indirect_load_store_deref(b, orig_instr, parent, deref_arr,
start, mid, &then_dest, src);
nir_push_else(b, NULL);