I want it from another location.
}
}
+bool
+qir_src_needs_a_file(struct qinst *inst)
+{
+ switch (inst->op) {
+ case QOP_UNPACK_8A_F:
+ case QOP_UNPACK_8B_F:
+ case QOP_UNPACK_8C_F:
+ case QOP_UNPACK_8D_F:
+ case QOP_UNPACK_16A_F:
+ case QOP_UNPACK_16B_F:
+ case QOP_UNPACK_8A_I:
+ case QOP_UNPACK_8B_I:
+ case QOP_UNPACK_8C_I:
+ case QOP_UNPACK_8D_I:
+ case QOP_UNPACK_16A_I:
+ case QOP_UNPACK_16B_I:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool
qir_writes_r4(struct qinst *inst)
{
bool qir_depends_on_flags(struct qinst *inst);
bool qir_writes_r4(struct qinst *inst);
bool qir_reads_r4(struct qinst *inst);
+bool qir_src_needs_a_file(struct qinst *inst);
struct qreg qir_follow_movs(struct qinst **defs, struct qreg reg);
void qir_dump(struct vc4_compile *c);
vc4->reg_class_a);
break;
- case QOP_UNPACK_8A_F:
- case QOP_UNPACK_8B_F:
- case QOP_UNPACK_8C_F:
- case QOP_UNPACK_8D_F:
- case QOP_UNPACK_16A_F:
- case QOP_UNPACK_16B_F:
- case QOP_UNPACK_8A_I:
- case QOP_UNPACK_8B_I:
- case QOP_UNPACK_8C_I:
- case QOP_UNPACK_8D_I:
- case QOP_UNPACK_16A_I:
- case QOP_UNPACK_16B_I:
- /* The unpack flags require an A-file src register. */
- ra_set_node_class(g, temp_to_node[inst->src[0].index],
- vc4->reg_class_a);
- break;
-
default:
break;
}
+
+ if (qir_src_needs_a_file(inst)) {
+ ra_set_node_class(g, temp_to_node[inst->src[0].index],
+ vc4->reg_class_a);
+ }
}
for (uint32_t i = 0; i < c->num_temps; i++) {