[QOP_LOG2] = { "log2", 1, 2 },
[QOP_PACK_COLORS] = { "pack_colors", 1, 4 },
[QOP_PACK_SCALED] = { "pack_scaled", 1, 2 },
- [QOP_VPM_WRITE] = { "vpm_write", 0, 1, true },
[QOP_VPM_READ] = { "vpm_read", 0, 1, true },
[QOP_TLB_DISCARD_SETUP] = { "discard", 0, 1, true },
[QOP_TLB_STENCIL_SETUP] = { "tlb_stencil_setup", 0, 1, true },
}
}
+ if (inst->dst.file == QFILE_VPM)
+ return true;
+
return qir_op_info[inst->op].has_side_effects;
}
fprintf(stderr, "%d", reg.index);
else
fprintf(stderr, "%f", uif(reg.index));
+ } else if (reg.file == QFILE_VPM) {
+ fprintf(stderr, "vpm");
} else {
fprintf(stderr, "%s%d", files[reg.file], reg.index);
}
QFILE_TEMP,
QFILE_VARY,
QFILE_UNIF,
+ QFILE_VPM,
/**
* Stores an immediate value in the index field that can be turned
QOP_VR_SETUP,
QOP_PACK_SCALED,
QOP_PACK_COLORS,
- QOP_VPM_WRITE,
QOP_VPM_READ,
QOP_TLB_DISCARD_SETUP,
QOP_TLB_STENCIL_SETUP,
QIR_ALU1(LOG2)
QIR_ALU2(PACK_SCALED)
QIR_ALU1(VARY_ADD_C)
-QIR_NODST_1(VPM_WRITE)
QIR_NODST_2(TEX_S)
QIR_NODST_2(TEX_T)
QIR_NODST_2(TEX_R)
qir_LOG2(c, x)));
}
+static inline void
+qir_VPM_WRITE(struct vc4_compile *c, struct qreg val)
+{
+ static const struct qreg vpm = { QFILE_VPM, 0 };
+ qir_emit(c, qir_inst(QOP_MOV, vpm, val, c->undef));
+}
+
#endif /* VC4_QIR_H */
*/
assert(src[i].addr <= 47);
break;
+ case QFILE_VPM:
+ assert(!"not reached");
+ break;
}
}
case QFILE_TEMP:
dst = temp_registers[qinst->dst.index];
break;
+ case QFILE_VPM:
+ dst = qpu_ra(QPU_W_VPM);
+ break;
case QFILE_VARY:
case QFILE_UNIF:
case QFILE_SMALL_IMM:
break;
- case QOP_VPM_WRITE:
- queue(c, qpu_a_MOV(qpu_ra(QPU_W_VPM), src[0]));
- break;
-
case QOP_VPM_READ:
queue(c, qpu_a_MOV(dst, qpu_ra(QPU_R_VPM)));
break;