summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_gather.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
index 7654ba01d88..2d1fb65b15f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
@@ -227,11 +227,13 @@ lp_build_gather_elem_vec(struct gallivm_state *gallivm,
* with src_width >= 32 here?
*/
} else {
+ LLVMTypeRef dst_elem_type = lp_build_vec_type(gallivm, dst_type);
+
/*
* Only valid if src_ptr_type is int type...
*/
- res = LLVMBuildZExt(gallivm->builder, res,
- lp_build_vec_type(gallivm, dst_type), "");
+ res = LLVMBuildZExt(gallivm->builder, res, dst_elem_type, "");
+
if (vector_justify) {
#ifdef PIPE_ARCH_BIG_ENDIAN
res = LLVMBuildShl(gallivm->builder, res,