From: Brian Paul Date: Mon, 15 Mar 2010 17:27:24 +0000 (-0600) Subject: gallivm: fix typo/bug in lp_build_sgn() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d25d3cc0086a1a2a5b6c41ad37c035c33d56a487;p=mesa.git 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. --- 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; }