summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-03-15 11:27:24 -0600
committerBrian Paul <brianp@vmware.com>2010-03-15 11:30:05 -0600
commitd25d3cc0086a1a2a5b6c41ad37c035c33d56a487 (patch)
tree9da5844b715eef9bada778e33028e5783ec3335d
parent1d6d51413e546299010666ef64ce7e6c4a92064d (diff)
gallivm: fix typo/bug in lp_build_sgn()
We were never returning -1 as a result. This fixes some inverted/flipped faces with cube mapping.
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_arit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index c39b062d10..233a36669d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -770,7 +770,7 @@ lp_build_sgn(struct lp_build_context *bld,
/* Handle zero */
cond = lp_build_cmp(bld, PIPE_FUNC_EQUAL, a, bld->zero);
- res = lp_build_select(bld, cond, bld->zero, bld->one);
+ res = lp_build_select(bld, cond, bld->zero, res);
return res;
}