summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2015-07-04 03:03:33 +0200
committerRoland Scheidegger <sroland@vmware.com>2015-07-06 23:52:32 +0200
commit7b06af9d3ca7310197d39d55fc52c265da4bc59e (patch)
tree5c345c586e753ca1d8401a30b81d23dc26c2d2a6 /src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
parent128de6f6d7cd0eb5386dcc622afc6e28a8512e7f (diff)
downloadexternal_mesa3d-7b06af9d3ca7310197d39d55fc52c265da4bc59e.zip
external_mesa3d-7b06af9d3ca7310197d39d55fc52c265da4bc59e.tar.gz
external_mesa3d-7b06af9d3ca7310197d39d55fc52c265da4bc59e.tar.bz2
gallivm: fix lp_build_compare_ext
The expansion should always be to the same width as the input arguments no matter what, since these functions should work with any bit width of the arguments (the sext is a no-op on any sane simd architecture). Thus, fix the caller expecting differently. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=91222 Tested-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
index 1f2af85..0ad78b0 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
@@ -1961,8 +1961,11 @@ dset_emit_cpu(
struct lp_build_emit_data * emit_data,
unsigned pipe_func)
{
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
LLVMValueRef cond = lp_build_cmp(&bld_base->dbl_bld, pipe_func,
emit_data->args[0], emit_data->args[1]);
+ /* arguments were 64 bit but store as 32 bit */
+ cond = LLVMBuildTrunc(builder, cond, bld_base->int_bld.int_vec_type, "");
emit_data->output[emit_data->chan] = cond;
}