From 00eb74b275e21d567a0ab8a6731181e005208634 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 18 May 2012 00:55:13 +0100 Subject: [PATCH] Fix fetching integer inputs. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index a9d69a3259e..412dc0c622a 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; } -- 2.30.2