mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 00:10:10 +01:00
ac/llvm: Fix validation error with global io
Fixes: afd645f057 ("ac/llvm: remove LLVMBuildGEP usages")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20521>
This commit is contained in:
parent
55175cd13c
commit
10ac51a52b
1 changed files with 1 additions and 1 deletions
|
|
@ -2144,7 +2144,7 @@ static LLVMValueRef get_global_address(struct ac_nir_context *ctx,
|
||||||
LLVMTypeRef i8_ptr_type = LLVMPointerType(ctx->ac.i8, AC_ADDR_SPACE_GLOBAL);
|
LLVMTypeRef i8_ptr_type = LLVMPointerType(ctx->ac.i8, AC_ADDR_SPACE_GLOBAL);
|
||||||
addr = LLVMBuildIntToPtr(ctx->ac.builder, addr, i8_ptr_type, "");
|
addr = LLVMBuildIntToPtr(ctx->ac.builder, addr, i8_ptr_type, "");
|
||||||
addr = LLVMBuildGEP2(ctx->ac.builder, ctx->ac.i8, addr, &offset, 1, "");
|
addr = LLVMBuildGEP2(ctx->ac.builder, ctx->ac.i8, addr, &offset, 1, "");
|
||||||
return addr;
|
return LLVMBuildPointerCast(ctx->ac.builder, addr, ptr_type, "");
|
||||||
} else {
|
} else {
|
||||||
return LLVMBuildIntToPtr(ctx->ac.builder, addr, ptr_type, "");
|
return LLVMBuildIntToPtr(ctx->ac.builder, addr, ptr_type, "");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue