ac/llvm: switch ac_build_gep_ptr to LLVMBuildGEP2
Reviewed-by: Mihai Preda <mhpreda@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>
This commit is contained in:

committed by
Marge Bot

parent
0f00f74b20
commit
f68b18f285
@@ -1084,10 +1084,10 @@ LLVMValueRef ac_build_fs_interp_mov(struct ac_llvm_context *ctx, LLVMValueRef pa
|
||||
}
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_gep_ptr(struct ac_llvm_context *ctx, LLVMValueRef base_ptr,
|
||||
LLVMValueRef ac_build_gep_ptr(struct ac_llvm_context *ctx, LLVMTypeRef type, LLVMValueRef base_ptr,
|
||||
LLVMValueRef index)
|
||||
{
|
||||
return LLVMBuildGEP(ctx->builder, base_ptr, &index, 1, "");
|
||||
return LLVMBuildGEP2(ctx->builder, type, base_ptr, &index, 1, "");
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_gep0(struct ac_llvm_context *ctx, LLVMValueRef base_ptr, LLVMValueRef index)
|
||||
|
@@ -251,7 +251,7 @@ LLVMValueRef ac_build_fs_interp_mov(struct ac_llvm_context *ctx, LLVMValueRef pa
|
||||
LLVMValueRef llvm_chan, LLVMValueRef attr_number,
|
||||
LLVMValueRef params);
|
||||
|
||||
LLVMValueRef ac_build_gep_ptr(struct ac_llvm_context *ctx, LLVMValueRef base_ptr,
|
||||
LLVMValueRef ac_build_gep_ptr(struct ac_llvm_context *ctx, LLVMTypeRef type, LLVMValueRef base_ptr,
|
||||
LLVMValueRef index);
|
||||
|
||||
LLVMValueRef ac_build_gep0(struct ac_llvm_context *ctx, LLVMValueRef base_ptr, LLVMValueRef index);
|
||||
|
@@ -4403,7 +4403,7 @@ static bool visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins
|
||||
for (unsigned i = 0; i < instr->num_components; i++) {
|
||||
if (write_mask & (1 << i)) {
|
||||
LLVMValueRef gds_ptr =
|
||||
ac_build_gep_ptr(&ctx->ac, gdsbase, LLVMConstInt(ctx->ac.i32, i, 0));
|
||||
ac_build_gep_ptr(&ctx->ac, ctx->ac.i32, gdsbase, LLVMConstInt(ctx->ac.i32, i, 0));
|
||||
LLVMValueRef count =
|
||||
LLVMBuildExtractElement(ctx->ac.builder, add_count,
|
||||
LLVMConstInt(ctx->ac.i32, i, false), "");
|
||||
|
@@ -412,7 +412,7 @@ static void build_streamout(struct si_shader_context *ctx, struct ngg_streamout
|
||||
for (unsigned i = 0; i < 4; i++) {
|
||||
if (ctx->shader->selector->info.base.xfb_stride[i]) {
|
||||
LLVMValueRef gds_ptr =
|
||||
ac_build_gep_ptr(&ctx->ac, gdsbase, LLVMConstInt(ctx->ac.i32, i, 0));
|
||||
ac_build_gep_ptr(&ctx->ac, ctx->ac.i32, gdsbase, LLVMConstInt(ctx->ac.i32, i, 0));
|
||||
|
||||
dwords_written[i] = LLVMBuildAtomicRMW(builder, LLVMAtomicRMWBinOpAdd,
|
||||
gds_ptr, dwords_written[i],
|
||||
|
Reference in New Issue
Block a user