Mesa (master): gallivm: Fixed overflow in lp_build_clamped_float_to_unsigned_norm.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue May 22 09:28:34 UTC 2012


Module: Mesa
Branch: master
Commit: f89b1f4ba4c7b13458532d916677aea3a66647dd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f89b1f4ba4c7b13458532d916677aea3a66647dd

Author: James Benton <jbenton at vmware.com>
Date:   Fri May 18 16:01:25 2012 +0100

gallivm: Fixed overflow in lp_build_clamped_float_to_unsigned_norm.

Tested with lp_test_conv and lp_test_format, reduced errors.

Signed-off-by: José Fonseca <jfonseca at vmware.com>

---

 src/gallium/auxiliary/gallivm/lp_bld_conv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
index 8a08663..f0ef516 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
@@ -190,7 +190,7 @@ lp_build_clamped_float_to_unsigned_norm(struct gallivm_state *gallivm,
       /*
        * Align the most significant bit to the right.
        */
-      rshifted =  LLVMBuildAShr(builder, res,
+      rshifted =  LLVMBuildLShr(builder, res,
                                 lp_build_const_int_vec(gallivm, src_type, rshift),
                                 "");
 




More information about the mesa-commit mailing list