diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c index e1b604cff0e..d6ef81d281d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_util.c +++ b/src/gallium/auxiliary/tgsi/tgsi_util.c @@ -103,67 +103,6 @@ tgsi_util_set_src_register_swizzle(struct tgsi_src_register *reg, } -unsigned -tgsi_util_get_full_src_register_sign_mode( - const struct tgsi_full_src_register *reg, - UNUSED unsigned component) -{ - unsigned sign_mode; - - if (reg->Register.Absolute) { - /* Consider only the post-abs negation. */ - - if (reg->Register.Negate) { - sign_mode = TGSI_UTIL_SIGN_SET; - } - else { - sign_mode = TGSI_UTIL_SIGN_CLEAR; - } - } - else { - if (reg->Register.Negate) { - sign_mode = TGSI_UTIL_SIGN_TOGGLE; - } - else { - sign_mode = TGSI_UTIL_SIGN_KEEP; - } - } - - return sign_mode; -} - - -void -tgsi_util_set_full_src_register_sign_mode(struct tgsi_full_src_register *reg, - unsigned sign_mode) -{ - switch (sign_mode) { - case TGSI_UTIL_SIGN_CLEAR: - reg->Register.Negate = 0; - reg->Register.Absolute = 1; - break; - - case TGSI_UTIL_SIGN_SET: - reg->Register.Absolute = 1; - reg->Register.Negate = 1; - break; - - case TGSI_UTIL_SIGN_TOGGLE: - reg->Register.Negate = 1; - reg->Register.Absolute = 0; - break; - - case TGSI_UTIL_SIGN_KEEP: - reg->Register.Negate = 0; - reg->Register.Absolute = 0; - break; - - default: - assert(0); - } -} - - /** * Determine which channels of the specificed src register are effectively * used by this instruction. diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.h b/src/gallium/auxiliary/tgsi/tgsi_util.h index 6dc576b1a00..e1f913d74b9 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_util.h +++ b/src/gallium/auxiliary/tgsi/tgsi_util.h @@ -57,21 +57,6 @@ tgsi_util_set_src_register_swizzle(struct tgsi_src_register *reg, unsigned swizzle, unsigned component); - -#define TGSI_UTIL_SIGN_CLEAR 0 /* Force positive */ -#define TGSI_UTIL_SIGN_SET 1 /* Force negative */ -#define TGSI_UTIL_SIGN_TOGGLE 2 /* Negate */ -#define TGSI_UTIL_SIGN_KEEP 3 /* No change */ - -unsigned -tgsi_util_get_full_src_register_sign_mode( - const struct tgsi_full_src_register *reg, - unsigned component); - -void -tgsi_util_set_full_src_register_sign_mode(struct tgsi_full_src_register *reg, - unsigned sign_mode); - unsigned tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst, unsigned src_idx); diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 29c5dc3548e..e2d0865d944 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -257,9 +257,7 @@ translate_src_register( const struct svga_shader_emitter *emit, reg->Register.SwizzleZ, reg->Register.SwizzleW ); - /* src.mod isn't a bitfield, unfortunately: - * See tgsi_util_get_full_src_register_sign_mode for implementation details. - */ + /* src.mod isn't a bitfield, unfortunately */ if (reg->Register.Absolute) { if (reg->Register.Negate) src.base.srcMod = SVGA3DSRCMOD_ABSNEG;