pan/midgard: Force perspective ops to use vec4

It doesn't make sense to use them with anything less.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-07-24 15:36:46 -07:00
parent b06951d343
commit 8ddb0eda42
+16
View File
@@ -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);
}
}
}