aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/panfrost/midgard/midgard_ra.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 19c60f4b05d..485ab789cd4 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -317,6 +317,16 @@ set_class(unsigned *classes, unsigned node, unsigned class)
classes[node] |= (class << 2);
}
+static void
+force_vec4(unsigned *classes, unsigned node)
+{
+ if ((node < 0) || (node >= SSA_FIXED_MINIMUM))
+ return;
+
+ /* Force vec4 = 3 */
+ classes[node] |= 0x3;
+}
+
/* Special register classes impose special constraints on who can read their
* values, so check that */
@@ -514,6 +524,12 @@ allocate_registers(compiler_context *ctx, bool *spilled)
set_class(found_class, ins->ssa_args.src0, class);
set_class(found_class, ins->ssa_args.src1, class);
+
+ if (force_r27) {
+ force_vec4(found_class, ins->ssa_args.dest);
+ force_vec4(found_class, ins->ssa_args.src0);
+ force_vec4(found_class, ins->ssa_args.src1);
+ }
}
}