From d25d3cc0086a1a2a5b6c41ad37c035c33d56a487 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 15 Mar 2010 11:27:24 -0600 Subject: [PATCH] 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. --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index c39b062d10e..233a36669d4 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; } -- 2.30.2