summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-05-18 00:55:13 +0100
committerJosé Fonseca <[email protected]>2012-05-18 00:55:13 +0100
commit00eb74b275e21d567a0ab8a6731181e005208634 (patch)
treebaa21e96f2193ff8c98966b38f4741694935f3d1 /src/gallium
parent5d10d757276a599a60a68b88b21087b5824a8df7 (diff)
Fix fetching integer inputs.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c8
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 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;
}