diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index 9bacaa7d3fc..874a12d5ca0 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -2313,7 +2313,7 @@ LLVMTypeRef ac_arg_type_to_pointee_type(struct ac_llvm_context *ctx, enum ac_arg return ctx->f32; break; case AC_ARG_CONST_PTR_PTR: - return ac_array_in_const32_addr_space(ctx); + return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST_32BIT); break; case AC_ARG_CONST_DESC_PTR: return ctx->v4i32; @@ -2327,16 +2327,6 @@ LLVMTypeRef ac_arg_type_to_pointee_type(struct ac_llvm_context *ctx, enum ac_arg } } -LLVMTypeRef ac_array_in_const_addr_space(struct ac_llvm_context *ctx) -{ - return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST); -} - -LLVMTypeRef ac_array_in_const32_addr_space(struct ac_llvm_context *ctx) -{ - return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST_32BIT); -} - static struct ac_llvm_flow *get_current_flow(struct ac_llvm_context *ctx) { if (ctx->flow->depth > 0) @@ -3617,10 +3607,10 @@ static LLVMTypeRef arg_llvm_type(enum ac_arg_type type, unsigned size, struct ac } if (size == 1) { - return ac_array_in_const32_addr_space(ctx); + return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST_32BIT); } else { assert(size == 2); - return ac_array_in_const_addr_space(ctx); + return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST); } } diff --git a/src/amd/llvm/ac_llvm_build.h b/src/amd/llvm/ac_llvm_build.h index 94789b0dcae..8817fea5b7f 100644 --- a/src/amd/llvm/ac_llvm_build.h +++ b/src/amd/llvm/ac_llvm_build.h @@ -408,9 +408,6 @@ void ac_init_exec_full_mask(struct ac_llvm_context *ctx); LLVMValueRef ac_find_lsb(struct ac_llvm_context *ctx, LLVMTypeRef dst_type, LLVMValueRef src0); -LLVMTypeRef ac_array_in_const_addr_space(struct ac_llvm_context *ctx); -LLVMTypeRef ac_array_in_const32_addr_space(struct ac_llvm_context *ctx); - void ac_build_bgnloop(struct ac_llvm_context *ctx, int lable_id); void ac_build_break(struct ac_llvm_context *ctx); void ac_build_continue(struct ac_llvm_context *ctx); diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm.c b/src/gallium/drivers/radeonsi/si_shader_llvm.c index 3cbec83cdca..9ff79c4c89b 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm.c @@ -261,7 +261,7 @@ LLVMValueRef si_prolog_get_internal_binding_slot(struct si_shader_context *ctx, { LLVMValueRef list = LLVMBuildIntToPtr( ctx->ac.builder, ac_get_arg(&ctx->ac, ctx->args->internal_bindings), - ac_array_in_const32_addr_space(&ctx->ac), ""); + LLVMPointerTypeInContext(ctx->ac.context, AC_ADDR_SPACE_CONST_32BIT), ""); LLVMValueRef index = LLVMConstInt(ctx->ac.i32, slot, 0); return ac_build_load_to_sgpr(&ctx->ac,