diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-02-27 10:07:32 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-27 21:02:35 +0000 |
commit | 658541a7450a850c700ad5b8bf1b5425f32773fc (patch) | |
tree | bea84b5a428ce905945c235b83257996f7786adb /src/panfrost/midgard | |
parent | 93ca47e046ca1cd1385e5941f3dea731ffe8e5af (diff) |
pan/midgard: Force address alignment
I thought we already had this but... maybe not..
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r-- | src/panfrost/midgard/midgard_ra.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index f2fd8384cb4..92dbc1fe63c 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -492,6 +492,16 @@ allocate_registers(compiler_context *ctx, bool *spilled) } } + if (ins->type == TAG_LOAD_STORE_4 && OP_HAS_ADDRESS(ins->load_store.op)) { + mir_foreach_src(ins, v) { + unsigned s = ins->src[v]; + unsigned size = mir_srcsize(ins, v); + + if (s < ctx->temp_count) + min_alignment[s] = (size == midgard_reg_mode_64) ? 3 : 2; + } + } + if (ins->dest >= SSA_FIXED_MINIMUM) continue; /* 0 for x, 1 for xy, 2 for xyz, 3 for xyzw */ |