From: Alyssa Rosenzweig Date: Wed, 24 Jul 2019 22:36:46 +0000 (-0700) Subject: pan/midgard: Force perspective ops to use vec4 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ddb0eda42a6c8bd0dc6e14ecfe4459f3f4964c4;p=mesa.git pan/midgard: Force perspective ops to use vec4 It doesn't make sense to use them with anything less. Signed-off-by: Alyssa Rosenzweig --- 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); + } } }