gallivm: LLVM opaque pointers small changes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
This commit is contained in:
Mihai Preda 2022-05-02 16:11:07 +03:00 committed by Mihai Preda
parent 051f588bfe
commit ccbee20f6b
3 changed files with 5 additions and 5 deletions

View file

@ -80,7 +80,7 @@ lp_build_fetch_rgba_aos_array(struct gallivm_state *gallivm,
*/ */
ptr = LLVMBuildGEP(builder, base_ptr, &offset, 1, ""); ptr = LLVMBuildGEP(builder, base_ptr, &offset, 1, "");
ptr = LLVMBuildPointerCast(builder, ptr, LLVMPointerType(src_vec_type, 0), ""); 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); LLVMSetAlignment(res, src_type.width / 8);
/* Truncate doubles to float */ /* Truncate doubles to float */

View file

@ -215,7 +215,7 @@ void lp_exec_mask_store(struct lp_exec_mask *mask,
if (exec_mask) { if (exec_mask) {
LLVMValueRef res, dst; LLVMValueRef res, dst;
dst = LLVMBuildLoad(builder, dst_ptr, ""); dst = LLVMBuildLoad2(builder, LLVMTypeOf(val), dst_ptr, "");
if (bld_store->type.width < 32) if (bld_store->type.width < 32)
exec_mask = LLVMBuildTrunc(builder, exec_mask, bld_store->vec_type, ""); exec_mask = LLVMBuildTrunc(builder, exec_mask, bld_store->vec_type, "");
res = lp_build_select(bld_store, exec_mask, val, dst); 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); struct function_ctx *ctx = func_ctx(mask);
if (ctx->loop_stack_size != ctx->bgnloop_stack_size) { 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); lp_exec_mask_update(mask);
ctx->bgnloop_stack_size = ctx->loop_stack_size; 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); LLVMBuildStore(builder, mask->break_mask, ctx->break_var);
/* Decrement the loop limiter */ /* Decrement the loop limiter */
limiter = LLVMBuildLoad(builder, ctx->loop_limiter, ""); limiter = LLVMBuildLoad2(builder, int_type, ctx->loop_limiter, "");
limiter = LLVMBuildSub( limiter = LLVMBuildSub(
builder, builder,

View file

@ -1191,7 +1191,7 @@ lp_build_sample_aos(struct lp_build_sample_context *bld,
lp_build_endif(&if_ctx); lp_build_endif(&if_ctx);
} }
packed = LLVMBuildLoad(builder, packed_var, ""); packed = LLVMBuildLoad2(builder, u8n_bld.vec_type, packed_var, "");
/* /*
* Convert to SoA and swizzle. * Convert to SoA and swizzle.