summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-12-06 16:22:06 -0500
committerAlyssa Rosenzweig <[email protected]>2019-12-12 11:42:07 -0500
commit5e75eb547ff7efb8dc1d2845d034e62c1ab12442 (patch)
tree430999e5a5db4ab55dca11f3efde1a6985945e47 /src/panfrost/midgard
parent8c79467a0d4d1c605bb93cbed844330f2fd4cbeb (diff)
pan/midgard: Force alignment for csel_v
The swizzle on the conditional gets lost. Fixes "horizontal mirroring" in godot. See https://gitlab.freedesktop.org/mesa/mesa/issues/2108 which has attached apitrace. Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: d3b3daa9d3f ("pan/midgard: Use new scheduler") Reported-by: Icecream95
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_ra.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 2fe406d6e7a..c084a896a40 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -473,6 +473,14 @@ allocate_registers(compiler_context *ctx, bool *spilled)
if (ins->type == TAG_LOAD_STORE_4 && ins->load_64)
min_alignment[dest] = 3;
+
+ /* We don't have a swizzle for the conditional and we don't
+ * want to muck with the conditional itself, so just force
+ * alignment for now */
+
+ if (ins->type == TAG_ALU_4 && OP_IS_CSEL_V(ins->alu.op))
+ min_alignment[dest] = 4; /* 1 << 4= 16-byte = vec4 */
+
}
for (unsigned i = 0; i < ctx->temp_count; ++i) {