From: José Fonseca Date: Thu, 17 May 2012 23:55:13 +0000 (+0100) Subject: Fix fetching integer inputs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00eb74b275e21d567a0ab8a6731181e005208634;p=mesa.git Fix fetching integer inputs. --- 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; }