It's valid because we reuse certain arithmetic operations
for both signed and unsigned types (e.g. uadd, umad, which
have a bit unfortunate naming)
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
assert(0);
break;
case TGSI_TYPE_SIGNED:
+ case TGSI_TYPE_UNSIGNED:
res = lp_build_negate( &bld_base->int_bld, res );
break;
- case TGSI_TYPE_UNSIGNED:
case TGSI_TYPE_VOID:
default:
assert(0);
/* XXX some src args may be signed for SAD ? */
case TGSI_OPCODE_SAD:
case TGSI_OPCODE_U2F:
+ case TGSI_OPCODE_UADD:
case TGSI_OPCODE_UDIV:
case TGSI_OPCODE_UMOD:
case TGSI_OPCODE_UMAD:
case TGSI_OPCODE_IABS:
case TGSI_OPCODE_ISSG:
case TGSI_OPCODE_UARL:
- /* UADD is both signed and unsigned require signed for working modifiers */
- case TGSI_OPCODE_UADD:
return TGSI_TYPE_SIGNED;
default:
return TGSI_TYPE_FLOAT;
modifiers are supported (with absolute value being applied first).
TGSI_OPCODE_MOV is considered to have float input type for applying modifiers.
-For inputs which have signed type only the negate modifier is supported. This
-includes instructions which are otherwise ignorant if the type is signed or
-unsigned, such as TGSI_OPCODE_UADD.
-
-For inputs with unsigned type no modifiers are allowed.
+For inputs which have signed or unsigned type only the negate modifier is
+supported.
Instruction Set
---------------