diff options
author | José Fonseca <[email protected]> | 2012-05-15 22:36:09 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-05-15 22:39:24 +0100 |
commit | 9fb4eef6a159fb5af97694b15a5f9b5998e9f6e5 (patch) | |
tree | 5251b626bed76f61487678972bb08335f2128ef3 /src/gallium/auxiliary | |
parent | c95cea50a9e14255a60c37b156271b7ab50515e9 (diff) |
gallivm: Fix lp_build_sgn for normalized/fixed-point integers.
These types got broken with the recent commit that fixed lp_build_sgn
for negative integers.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_arit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 3a74790e89f..d112f1a59b4 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -926,7 +926,8 @@ lp_build_sgn(struct lp_build_context *bld, } else { - LLVMValueRef minus_one = lp_build_const_int_vec(bld->gallivm, type, -1.0); + /* signed int/norm/fixed point */ + LLVMValueRef minus_one = lp_build_const_vec(bld->gallivm, type, -1.0); cond = lp_build_cmp(bld, PIPE_FUNC_GREATER, a, bld->zero); res = lp_build_select(bld, cond, bld->one, minus_one); } |