[TGSI_OPCODE_DP2] = { 0, tgsi_to_qir_dp2 },
[TGSI_OPCODE_DP3] = { 0, tgsi_to_qir_dp3 },
[TGSI_OPCODE_DP4] = { 0, tgsi_to_qir_dp4 },
+ [TGSI_OPCODE_RCP] = { QOP_RCP, tgsi_to_qir_alu },
+ [TGSI_OPCODE_RSQ] = { QOP_RSQ, tgsi_to_qir_alu },
+ [TGSI_OPCODE_EX2] = { QOP_EXP2, tgsi_to_qir_alu },
+ [TGSI_OPCODE_LG2] = { QOP_LOG2, tgsi_to_qir_alu },
[TGSI_OPCODE_LIT] = { QOP_MOV, tgsi_to_qir_alu }, /* XXX */
};
static int asdf = 0;
qpu_m_NOP());
break;
+ case QOP_RCP:
+ case QOP_RSQ:
+ case QOP_EXP2:
+ case QOP_LOG2:
+ switch (qinst->op) {
+ case QOP_RCP:
+ insts[ni++] = qpu_inst(qpu_a_MOV(qpu_rb(QPU_W_SFU_RECIP),
+ src[0]),
+ qpu_m_NOP());
+ break;
+ case QOP_RSQ:
+ insts[ni++] = qpu_inst(qpu_a_MOV(qpu_rb(QPU_W_SFU_RECIPSQRT),
+ src[0]),
+ qpu_m_NOP());
+ break;
+ case QOP_EXP2:
+ insts[ni++] = qpu_inst(qpu_a_MOV(qpu_rb(QPU_W_SFU_EXP),
+ src[0]),
+ qpu_m_NOP());
+ break;
+ case QOP_LOG2:
+ insts[ni++] = qpu_inst(qpu_a_MOV(qpu_rb(QPU_W_SFU_LOG),
+ src[0]),
+ qpu_m_NOP());
+ break;
+ default:
+ abort();
+ }
+
+ insts[ni++] = qpu_inst(qpu_a_NOP(), qpu_m_NOP());
+ insts[ni++] = qpu_inst(qpu_a_NOP(), qpu_m_NOP());
+
+ insts[ni++] = qpu_inst(qpu_a_MOV(dst, qpu_r4()),
+ qpu_m_NOP());
+
+ break;
+
case QOP_PACK_COLORS:
for (int i = 0; i < 4; i++) {
insts[ni++] = qpu_inst(qpu_a_NOP(),
insts[ni++] = qpu_inst(qpu_a_MOV(dst, qpu_r5()),
qpu_m_NOP());
-
break;
case QOP_TLB_COLOR_WRITE: