gallivm: add coroutine attribute that llvm requires.

Running llvm in debug mode asserts on this being missing.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14963>
This commit is contained in:
Dave Airlie 2022-02-10 10:54:58 +10:00 committed by Marge Bot
parent 31e2c3f550
commit da0e00e0b9
2 changed files with 3 additions and 0 deletions

View file

@ -3397,6 +3397,8 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
LLVMSetFunctionCallConv(variant_coro, LLVMCCallConv);
LLVMAddTargetDependentFunctionAttr(variant_coro, "coroutine.presplit", "0");
for (i = 0; i < ARRAY_SIZE(arg_types); ++i) {
if (LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind) {
lp_add_function_attr(variant_coro, i + 1, LP_FUNC_ATTR_NOALIAS);

View file

@ -133,6 +133,7 @@ generate_compute(struct llvmpipe_context *lp,
coro = LLVMAddFunction(gallivm->module, func_name_coro, coro_func_type);
LLVMSetFunctionCallConv(coro, LLVMCCallConv);
LLVMAddTargetDependentFunctionAttr(coro, "coroutine.presplit", "0");
variant->function = function;