qir_LOG2(c, src[0 * 4 + 0])));
}
+static struct qreg
+tgsi_to_qir_trunc(struct tgsi_to_qir *trans,
+ struct tgsi_full_instruction *tgsi_inst,
+ enum qop op, struct qreg *src, int i)
+{
+ struct qcompile *c = trans->c;
+ return qir_ITOF(c, qir_FTOI(c, src[0 * 4 + i]));
+}
+
+
static struct qreg
tgsi_to_qir_dp(struct tgsi_to_qir *trans,
struct tgsi_full_instruction *tgsi_inst,
[TGSI_OPCODE_LIT] = { 0, tgsi_to_qir_lit },
[TGSI_OPCODE_LRP] = { 0, tgsi_to_qir_lrp },
[TGSI_OPCODE_POW] = { 0, tgsi_to_qir_pow },
+ [TGSI_OPCODE_TRUNC] = { 0, tgsi_to_qir_trunc },
};
static int asdf = 0;
uint32_t tgsi_op = tgsi_inst->Instruction.Opcode;
[QOP_CMP] = { "cmp", 1, 3 },
[QOP_FTOI] = { "ftoi", 1, 1 },
+ [QOP_ITOF] = { "itof", 1, 1 },
[QOP_RCP] = { "rcp", 1, 1 },
[QOP_RSQ] = { "rsq", 1, 1 },
[QOP_EXP2] = { "exp2", 1, 2 },