diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c index 7d106195d0a..bc0bd4f4831 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c @@ -80,7 +80,7 @@ lp_build_fetch_rgba_aos_array(struct gallivm_state *gallivm, */ ptr = LLVMBuildGEP(builder, base_ptr, &offset, 1, ""); ptr = LLVMBuildPointerCast(builder, ptr, LLVMPointerType(src_vec_type, 0), ""); - res = LLVMBuildLoad(builder, ptr, ""); + res = LLVMBuildLoad2(builder, src_vec_type, ptr, ""); LLVMSetAlignment(res, src_type.width / 8); /* Truncate doubles to float */ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c index cecc8abc31b..d127ea0c7ff 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c @@ -215,7 +215,7 @@ void lp_exec_mask_store(struct lp_exec_mask *mask, if (exec_mask) { LLVMValueRef res, dst; - dst = LLVMBuildLoad(builder, dst_ptr, ""); + dst = LLVMBuildLoad2(builder, LLVMTypeOf(val), dst_ptr, ""); if (bld_store->type.width < 32) exec_mask = LLVMBuildTrunc(builder, exec_mask, bld_store->vec_type, ""); res = lp_build_select(bld_store, exec_mask, val, dst); @@ -230,7 +230,7 @@ void lp_exec_bgnloop_post_phi(struct lp_exec_mask *mask) struct function_ctx *ctx = func_ctx(mask); if (ctx->loop_stack_size != ctx->bgnloop_stack_size) { - mask->break_mask = LLVMBuildLoad(builder, ctx->break_var, ""); + mask->break_mask = LLVMBuildLoad2(builder, mask->int_vec_type, ctx->break_var, ""); lp_exec_mask_update(mask); ctx->bgnloop_stack_size = ctx->loop_stack_size; } @@ -303,7 +303,7 @@ void lp_exec_endloop(struct gallivm_state *gallivm, LLVMBuildStore(builder, mask->break_mask, ctx->break_var); /* Decrement the loop limiter */ - limiter = LLVMBuildLoad(builder, ctx->loop_limiter, ""); + limiter = LLVMBuildLoad2(builder, int_type, ctx->loop_limiter, ""); limiter = LLVMBuildSub( builder, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c index 0564b156d97..b0a9f48e8e0 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c @@ -1191,7 +1191,7 @@ lp_build_sample_aos(struct lp_build_sample_context *bld, lp_build_endif(&if_ctx); } - packed = LLVMBuildLoad(builder, packed_var, ""); + packed = LLVMBuildLoad2(builder, u8n_bld.vec_type, packed_var, ""); /* * Convert to SoA and swizzle.