mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
gallivm: fix coroutines with llvm 18
llvm 18 added an extra parameters to coro end which should just take a null token always for us. Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27133>
This commit is contained in:
parent
3b62b0d096
commit
550cc685a7
1 changed files with 7 additions and 2 deletions
|
|
@ -89,13 +89,18 @@ LLVMValueRef lp_build_coro_free(struct gallivm_state *gallivm,
|
|||
|
||||
void lp_build_coro_end(struct gallivm_state *gallivm, LLVMValueRef coro_hdl)
|
||||
{
|
||||
LLVMValueRef coro_end_args[2];
|
||||
LLVMValueRef coro_end_args[3];
|
||||
int num_args = 2;
|
||||
coro_end_args[0] = coro_hdl;
|
||||
coro_end_args[1] = LLVMConstInt(LLVMInt1TypeInContext(gallivm->context), 0, 0);
|
||||
#if LLVM_VERSION_MAJOR >= 18
|
||||
coro_end_args[2] = LLVMConstNull(LLVMTokenTypeInContext(gallivm->context));
|
||||
num_args++;
|
||||
#endif
|
||||
lp_build_intrinsic(gallivm->builder,
|
||||
"llvm.coro.end",
|
||||
LLVMInt1TypeInContext(gallivm->context),
|
||||
coro_end_args, 2, 0);
|
||||
coro_end_args, num_args, 0);
|
||||
}
|
||||
|
||||
void lp_build_coro_resume(struct gallivm_state *gallivm, LLVMValueRef coro_hdl)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue