diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c index 55ced4c67cc..4118928d52e 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c @@ -362,11 +362,11 @@ build_unary_test_func(struct gallivm_state *gallivm, LLVMSetFunctionCallConv(func, LLVMCCallConv); LLVMPositionBuilderAtEnd(builder, block); - - arg1 = LLVMBuildLoad(builder, arg1, ""); + + arg1 = LLVMBuildLoad2(builder, vf32t, arg1, ""); ret = test->builder(&bld, arg1); - + LLVMBuildStore(builder, ret, arg0); LLVMBuildRetVoid(builder); diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index 7805ec58d98..2d44e8eafe7 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -172,10 +172,10 @@ add_blend_test(struct gallivm_state *gallivm, builder = gallivm->builder; LLVMPositionBuilderAtEnd(builder, block); - src = LLVMBuildLoad(builder, src_ptr, "src"); - src1 = LLVMBuildLoad(builder, src1_ptr, "src1"); - dst = LLVMBuildLoad(builder, dst_ptr, "dst"); - con = LLVMBuildLoad(builder, const_ptr, "const"); + src = LLVMBuildLoad2(builder, vec_type, src_ptr, "src"); + src1 = LLVMBuildLoad2(builder, vec_type, src1_ptr, "src1"); + dst = LLVMBuildLoad2(builder, vec_type, dst_ptr, "dst"); + con = LLVMBuildLoad2(builder, vec_type, const_ptr, "const"); res = lp_build_blend_aos(gallivm, blend, format, type, rt, src, NULL, src1, NULL, dst, NULL, con, NULL, swizzle, 4); diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c index 9ae148866af..05aaa1b4fcd 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_conv.c +++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c @@ -112,9 +112,11 @@ add_conv_test(struct gallivm_state *gallivm, LLVMValueRef src[LP_MAX_VECTOR_LENGTH]; LLVMValueRef dst[LP_MAX_VECTOR_LENGTH]; unsigned i; + LLVMTypeRef src_vec_type = lp_build_vec_type(gallivm, src_type); + LLVMTypeRef dst_vec_type = lp_build_vec_type(gallivm, dst_type); - args[0] = LLVMPointerType(lp_build_vec_type(gallivm, src_type), 0); - args[1] = LLVMPointerType(lp_build_vec_type(gallivm, dst_type), 0); + args[0] = LLVMPointerType(src_vec_type, 0); + args[1] = LLVMPointerType(dst_vec_type, 0); func = LLVMAddFunction(module, "test", LLVMFunctionType(LLVMVoidTypeInContext(context), @@ -128,15 +130,15 @@ add_conv_test(struct gallivm_state *gallivm, for(i = 0; i < num_srcs; ++i) { LLVMValueRef index = LLVMConstInt(LLVMInt32TypeInContext(context), i, 0); - LLVMValueRef ptr = LLVMBuildGEP(builder, src_ptr, &index, 1, ""); - src[i] = LLVMBuildLoad(builder, ptr, ""); + LLVMValueRef ptr = LLVMBuildGEP2(builder, src_vec_type, src_ptr, &index, 1, ""); + src[i] = LLVMBuildLoad2(builder, src_vec_type, ptr, ""); } lp_build_conv(gallivm, src_type, dst_type, src, num_srcs, dst, num_dsts); for(i = 0; i < num_dsts; ++i) { LLVMValueRef index = LLVMConstInt(LLVMInt32TypeInContext(context), i, 0); - LLVMValueRef ptr = LLVMBuildGEP(builder, dst_ptr, &index, 1, ""); + LLVMValueRef ptr = LLVMBuildGEP2(builder, dst_vec_type, dst_ptr, &index, 1, ""); LLVMBuildStore(builder, dst[i], ptr); }