Mesa (master): gallivm: Eliminate tgsi_util_get_full_src_register_sign_mode call.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Sun Oct 16 13:19:53 UTC 2011
Module: Mesa
Branch: master
Commit: e1e03ce4928edf4ea0ef43d853cb869f70b126aa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1e03ce4928edf4ea0ef43d853cb869f70b126aa
Author: José Fonseca <jose.r.fonseca at gmail.com>
Date: Sun Oct 16 13:48:33 2011 +0100
gallivm: Eliminate tgsi_util_get_full_src_register_sign_mode call.
It complicates more than it simplifies, now that there's only one negate
bit on TGSI registers.
---
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 602f96e..40744e3 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -783,20 +783,12 @@ emit_fetch(
return bld->base.undef;
}
- switch( tgsi_util_get_full_src_register_sign_mode( reg, chan_index ) ) {
- case TGSI_UTIL_SIGN_CLEAR:
+ if (reg->Register.Absolute) {
res = lp_build_abs( &bld->base, res );
- break;
+ }
- case TGSI_UTIL_SIGN_SET:
- res = lp_build_abs( &bld->base, res );
- /* fall through */
- case TGSI_UTIL_SIGN_TOGGLE:
+ if (reg->Register.Negate) {
res = lp_build_negate( &bld->base, res );
- break;
-
- case TGSI_UTIL_SIGN_KEEP:
- break;
}
return res;
More information about the mesa-commit
mailing list