diff --git a/.pick_status.json b/.pick_status.json index 79649d7e7eb..56056bb23e9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2425,7 +2425,7 @@ "description": "pan/mdg: Fix 64-bit address arithmetic", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/panfrost/midgard/midgard_address.c b/src/panfrost/midgard/midgard_address.c index beb661ec50c..8b80f042ad0 100644 --- a/src/panfrost/midgard/midgard_address.c +++ b/src/panfrost/midgard/midgard_address.c @@ -256,9 +256,13 @@ mir_set_offset(compiler_context *ctx, midgard_instruction *ins, nir_src *offset, struct mir_address match = mir_match_offset(offset->ssa, first_free, true); if (match.A.def) { + unsigned bitsize = match.A.def->bit_size; + assert(bitsize == 32 || bitsize == 64); + ins->src[1] = nir_ssa_index(match.A.def); ins->swizzle[1][0] = match.A.comp; - ins->src_types[1] = nir_type_uint | match.A.def->bit_size; + ins->src_types[1] = nir_type_uint | bitsize; + ins->load_store.bitsize_toggle = (bitsize == 64); } else { ins->load_store.bitsize_toggle = true; ins->load_store.arg_comp = seg & 0x3;