This is a necessary operation that is missing from TGSI.
Reviewed-by: Brian Paul <brianp@vmware.com>
exec_vector_trinary(mach, inst, micro_ucmp, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT);
break;
+ case TGSI_OPCODE_IABS:
+ exec_vector_unary(mach, inst, micro_iabs, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT);
+ break;
+
default:
assert( 0 );
}
{ 1, 1, 0, 0, 0, 0, "UARL", TGSI_OPCODE_UARL },
{ 1, 3, 0, 0, 0, 0, "UCMP", TGSI_OPCODE_UCMP },
+ { 1, 1, 0, 0, 0, 0, "IABS", TGSI_OPCODE_IABS },
};
const struct tgsi_opcode_info *
destination register, which is assumed to be an address (ADDR) register.
+.. opcode:: IABS - Integer Absolute Value
+
+.. math::
+
+ dst.x = |src.x|
+
+ dst.y = |src.y|
+
+ dst.z = |src.z|
+
+ dst.w = |src.w|
+
+
.. opcode:: SAD - Sum Of Absolute Differences
.. math::
#define TGSI_OPCODE_UARL 157
#define TGSI_OPCODE_UCMP 158
+#define TGSI_OPCODE_IABS 159
-#define TGSI_OPCODE_LAST 159
+#define TGSI_OPCODE_LAST 160
#define TGSI_SAT_NONE 0 /* do not saturate */
#define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */