aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-24 15:36:46 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-25 06:37:22 -0700
commit8ddb0eda42a6c8bd0dc6e14ecfe4459f3f4964c4 (patch)
treef5bd7e7eb29b7fe38585454e2f0ce89afa0bfaa3 /src/panfrost
parentb06951d343ca1d94858c6c6c84f3afa3f5bdb806 (diff)
pan/midgard: Force perspective ops to use vec4
It doesn't make sense to use them with anything less. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-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);
+ }
}
}