mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 09:48:07 +02:00
ac/llvm: fix ac_build_atomic_rmw with LLVM 13
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4383 Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9361>
This commit is contained in:
parent
8bd0cc1a5a
commit
f9e6c7a220
1 changed files with 6 additions and 0 deletions
|
|
@ -321,6 +321,9 @@ LLVMValueRef ac_build_atomic_rmw(struct ac_llvm_context *ctx, LLVMAtomicRMWBinOp
|
|||
unsigned SSID = llvm::unwrap(ctx->context)->getOrInsertSyncScopeID(sync_scope);
|
||||
return llvm::wrap(llvm::unwrap(ctx->builder)
|
||||
->CreateAtomicRMW(binop, llvm::unwrap(ptr), llvm::unwrap(val),
|
||||
#if LLVM_VERSION_MAJOR >= 13
|
||||
llvm::MaybeAlign(0),
|
||||
#endif
|
||||
llvm::AtomicOrdering::SequentiallyConsistent, SSID));
|
||||
}
|
||||
|
||||
|
|
@ -331,6 +334,9 @@ LLVMValueRef ac_build_atomic_cmp_xchg(struct ac_llvm_context *ctx, LLVMValueRef
|
|||
return llvm::wrap(llvm::unwrap(ctx->builder)
|
||||
->CreateAtomicCmpXchg(llvm::unwrap(ptr), llvm::unwrap(cmp),
|
||||
llvm::unwrap(val),
|
||||
#if LLVM_VERSION_MAJOR >= 13
|
||||
llvm::MaybeAlign(0),
|
||||
#endif
|
||||
llvm::AtomicOrdering::SequentiallyConsistent,
|
||||
llvm::AtomicOrdering::SequentiallyConsistent, SSID));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue