Mesa (master): gallivm: (trivial) git rid of assertion in float-> uint conversion code

Roland Scheidegger sroland at kemper.freedesktop.org
Mon Jul 29 11:24:32 UTC 2013


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

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Mon Jul 29 13:23:56 2013 +0200

gallivm: (trivial) git rid of assertion in float->uint conversion code

Commit 8c3d3622d9ce2fd2a8f46084ab8153d708fa5b09 introduced a new assertion,
but since it causes lp_test_conv failures remove it again and let's hope
we don't really hit bugs caused by the potentially bogus code (it is possible
the assert() caught some cases which work correctly too).

---

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

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
index 56c1581..ba51ff7 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
@@ -752,9 +752,10 @@ lp_build_conv(struct gallivm_state *gallivm,
 
          /*
           * these functions will use fptosi in some form which won't work
-          * with 32bit uint dst.
+          * with 32bit uint dst. Causes lp_test_conv failures though.
           */
-         assert(dst_type.sign || dst_type.width < 32);
+         if (0)
+            assert(dst_type.sign || dst_type.width < 32);
 
          if (dst_type.sign && dst_type.norm && !dst_type.fixed) {
             struct lp_build_context bld;




More information about the mesa-commit mailing list