Mesa (master): Fix fetching integer inputs.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri May 18 00:01:04 UTC 2012


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

Author: José Fonseca <jose.r.fonseca at gmail.com>
Date:   Fri May 18 00:55:13 2012 +0100

Fix fetching integer inputs.

---

 src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index a9d69a3..412dc0c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -704,7 +704,15 @@ emit_fetch_input(
          res = bld->inputs[reg->Register.Index][swizzle];
       }
    }
+
    assert(res);
+
+   if (stype == TGSI_TYPE_UNSIGNED) {
+      res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, "");
+   } else if (stype == TGSI_TYPE_SIGNED) {
+      res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, "");
+   }
+
    return res;
 }
 




More information about the mesa-commit mailing list