[Mesa-dev] [PATCH 1/2] gallivm: allow negation of all integer types
Zack Rusin
zackr at vmware.com
Wed May 1 18:13:56 PDT 2013
It's valid. Some shaders do the negation on unsigned and then
use the results in opcodes taking signed integers.
Signed-off-by: Zack Rusin <zackr at vmware.com>
---
src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
index 7255d97..66ff14c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
@@ -339,9 +339,9 @@ lp_build_emit_fetch(
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);
--
1.7.10.4
More information about the mesa-dev
mailing list