cond, emit_data->args[1], emit_data->args[2]);
}
+/* TGSI_OPCODE_UCMP (CPU Only) */
+static void
+ucmp_emit_cpu(
+ const struct lp_build_tgsi_action * action,
+ struct lp_build_tgsi_context * bld_base,
+ struct lp_build_emit_data * emit_data)
+{
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+ struct lp_build_context *uint_bld = &bld_base->uint_bld;
+ LLVMValueRef unsigned_cond =
+ LLVMBuildBitCast(builder, emit_data->args[0], uint_bld->vec_type, "");
+ LLVMValueRef cond = lp_build_cmp(uint_bld, PIPE_FUNC_NOTEQUAL,
+ unsigned_cond,
+ uint_bld->zero);
+ emit_data->output[emit_data->chan] =
+ lp_build_select(&bld_base->base,
+ cond, emit_data->args[1], emit_data->args[2]);
+}
+
+
/* TGSI_OPCODE_CND (CPU Only) */
static void
cnd_emit_cpu(
bld_base->sqrt_action.emit = sqrt_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_UADD].emit = uadd_emit_cpu;
+ bld_base->op_actions[TGSI_OPCODE_UCMP].emit = ucmp_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_UDIV].emit = udiv_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_UMAX].emit = umax_emit_cpu;
bld_base->op_actions[TGSI_OPCODE_UMIN].emit = umin_emit_cpu;
--- /dev/null
+FRAG
+DCL IN[0], COLOR, LINEAR
+DCL OUT[0], COLOR
+DCL TEMP[0]
+IMM[0] FLT32 { 10.0000, 1.0000, 0.0000, 0.0000}
+IMM[1] UINT32 {1, 0, 0, 0}
+0: MUL TEMP[0].x, IN[0].xxxx, IMM[0].xxxx
+1: F2U TEMP[0].x, TEMP[0].xxxx
+2: AND TEMP[0].x, TEMP[0].xxxx, IMM[1].xxxx
+3: UCMP OUT[0], TEMP[0].xxxx, IMM[0].yzzz, IMM[0].yyyz
+4: END