mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 05:00:09 +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> (cherry picked from commit10ac51a52b)
This commit is contained in:
parent
a31787312d
commit
883b3ae0ca
2 changed files with 2 additions and 2 deletions
|
|
@ -499,7 +499,7 @@
|
|||
"description": "ac/llvm: Fix validation error with global io",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "afd645f0576f2cf41b65f360787f01604f00f0f2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2147,7 +2147,7 @@ static LLVMValueRef get_global_address(struct ac_nir_context *ctx,
|
|||
LLVMTypeRef i8_ptr_type = LLVMPointerType(ctx->ac.i8, AC_ADDR_SPACE_GLOBAL);
|
||||
addr = LLVMBuildIntToPtr(ctx->ac.builder, addr, i8_ptr_type, "");
|
||||
addr = LLVMBuildGEP2(ctx->ac.builder, ctx->ac.i8, addr, &offset, 1, "");
|
||||
return addr;
|
||||
return LLVMBuildPointerCast(ctx->ac.builder, addr, ptr_type, "");
|
||||
} else {
|
||||
return LLVMBuildIntToPtr(ctx->ac.builder, addr, ptr_type, "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue