}
else
{
- LLVMValueRef minus_one = lp_build_const_vec(bld->gallivm, type, -1.0);
+ LLVMValueRef minus_one = lp_build_const_int_vec(bld->gallivm, type, -1.0);
cond = lp_build_cmp(bld, PIPE_FUNC_GREATER, a, bld->zero);
res = lp_build_select(bld, cond, bld->one, minus_one);
}
emit_data->args[0]);
}
+/* TGSI_OPCODE_IABS (CPU Only) */
+static void
+iabs_emit_cpu(
+ const struct lp_build_tgsi_action * action,
+ struct lp_build_tgsi_context * bld_base,
+ struct lp_build_emit_data * emit_data)
+{
+ emit_data->output[emit_data->chan] = lp_build_abs(&bld_base->int_bld,
+ emit_data->args[0]);
+}
+
/* TGSI_OPCODE_IDIV (CPU Only) */
static void
idiv_emit_cpu(
iset_emit_cpu(action, bld_base, emit_data, PIPE_FUNC_LESS);
}
+
+/* TGSI_OPCODE_ISSG (CPU Only) */
+static void
+issg_emit_cpu(
+ const struct lp_build_tgsi_action * action,
+ struct lp_build_tgsi_context * bld_base,
+ struct lp_build_emit_data * emit_data)
+{
+ emit_data->output[emit_data->chan] = lp_build_sgn(&bld_base->int_bld,
+ emit_data->args[0]);
+}
+
/* TGSI_OPCODE_LG2 (CPU Only) */
static void
lg2_emit_cpu(
bld_base->op_actions[TGSI_OPCODE_FLR].emit = flr_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_I2F].emit = i2f_emit_cpu;
+ bld_base->op_actions[TGSI_OPCODE_IABS].emit = iabs_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_IDIV].emit = idiv_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_INEG].emit = ineg_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_IMAX].emit = imax_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_ISGE].emit = isge_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_ISHR].emit = ishr_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_ISLT].emit = islt_emit_cpu;
+ bld_base->op_actions[TGSI_OPCODE_ISSG].emit = issg_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_LG2].emit = lg2_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_LOG].emit = log_emit_cpu;