summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-07-01 20:54:19 +0100
committerJosé Fonseca <[email protected]>2013-07-02 06:30:06 +0100
commite621ec816da65a56c3ba038a85075000bf5882d2 (patch)
treea988d93b3b56a1d3a749d596e33d90e75b7c3fd6 /src/gallium
parent70bc43acdb487c7a38faab4f4aa864afe9cbfc84 (diff)
gallivm: Fix indirect immediate registers.
If reg->Register.Indirect is true then the immediate is not truly a constant LLVM expression. There is no performance regression in using LLVMBuildBitCast, as it will fallback to LLVMConstBitCast internally when the argument is a constant. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 0bbc408bd46..f6418591036 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -1026,9 +1026,9 @@ emit_fetch_immediate(
}
if (stype == TGSI_TYPE_UNSIGNED) {
- res = LLVMConstBitCast(res, bld_base->uint_bld.vec_type);
+ res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, "");
} else if (stype == TGSI_TYPE_SIGNED) {
- res = LLVMConstBitCast(res, bld_base->int_bld.vec_type);
+ res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, "");
}
return res;
}