Either that or have UDIV have two destination operands.
dst->u[3] = src[0].u[3] < src[1].u[3] ? src[0].u[3] : src[1].u[3];
}
+static void
+micro_umod(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src)
+{
+ dst->u[0] = src[0].u[0] % src[1].u[0];
+ dst->u[1] = src[0].u[1] % src[1].u[1];
+ dst->u[2] = src[0].u[2] % src[1].u[2];
+ dst->u[3] = src[0].u[3] % src[1].u[3];
+}
+
static void
micro_umul(union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src)
exec_vector_binary(mach, inst, micro_umin);
break;
+ case TGSI_OPCODE_UMOD:
+ exec_vector_binary(mach, inst, micro_umod);
+ break;
+
case TGSI_OPCODE_UMUL:
exec_vector_binary(mach, inst, micro_umul);
break;
{ 1, 3, 0, 0, 0, 0, "UMAD", TGSI_OPCODE_UMAD },
{ 1, 2, 0, 0, 0, 0, "UMAX", TGSI_OPCODE_UMAX },
{ 1, 2, 0, 0, 0, 0, "UMIN", TGSI_OPCODE_UMIN },
+ { 1, 2, 0, 0, 0, 0, "UMOD", TGSI_OPCODE_UMOD },
{ 1, 2, 0, 0, 0, 0, "UMUL", TGSI_OPCODE_UMUL },
{ 1, 2, 0, 0, 0, 0, "USEQ", TGSI_OPCODE_USEQ },
{ 1, 2, 0, 0, 0, 0, "USGE", TGSI_OPCODE_USGE },
OP13(UMAD)
OP12(UMAX)
OP12(UMIN)
+OP12(UMOD)
OP12(UMUL)
OP12(USEQ)
OP12(USGE)
#define TGSI_OPCODE_UMAD 131
#define TGSI_OPCODE_UMAX 132
#define TGSI_OPCODE_UMIN 133
-#define TGSI_OPCODE_UMUL 134
-#define TGSI_OPCODE_USEQ 135
-#define TGSI_OPCODE_USGE 136
-#define TGSI_OPCODE_USHR 137
-#define TGSI_OPCODE_USLT 138
-#define TGSI_OPCODE_USNE 139
-#define TGSI_OPCODE_SWITCH 140
-#define TGSI_OPCODE_CASE 141
-#define TGSI_OPCODE_DEFAULT 142
-#define TGSI_OPCODE_ENDSWITCH 143
-#define TGSI_OPCODE_LAST 144
+#define TGSI_OPCODE_UMOD 134
+#define TGSI_OPCODE_UMUL 135
+#define TGSI_OPCODE_USEQ 136
+#define TGSI_OPCODE_USGE 137
+#define TGSI_OPCODE_USHR 138
+#define TGSI_OPCODE_USLT 139
+#define TGSI_OPCODE_USNE 140
+#define TGSI_OPCODE_SWITCH 141
+#define TGSI_OPCODE_CASE 142
+#define TGSI_OPCODE_DEFAULT 143
+#define TGSI_OPCODE_ENDSWITCH 144
+#define TGSI_OPCODE_LAST 145
#define TGSI_SAT_NONE 0 /* do not saturate */
#define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */