gallium: LLVM-15 contexts use non-opaque pointers
LLVM-15 enables opaque pointers by default. We temporarilly request non-opaque pointers while we migrate our code to support non-opaque pointers. This workaround needs to be removed before LLVM-16. See #6615 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Kai Wasserbäch <kai@dev.carbon-project.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17514>
This commit is contained in:
parent
81d85be9a5
commit
bc78b861ca
|
@ -793,6 +793,11 @@ draw_llvm_create(struct draw_context *draw, LLVMContextRef context)
|
||||||
llvm->context = context;
|
llvm->context = context;
|
||||||
if (!llvm->context) {
|
if (!llvm->context) {
|
||||||
llvm->context = LLVMContextCreate();
|
llvm->context = LLVMContextCreate();
|
||||||
|
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(llvm->context, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
llvm->context_owned = true;
|
llvm->context_owned = true;
|
||||||
}
|
}
|
||||||
if (!llvm->context)
|
if (!llvm->context)
|
||||||
|
|
|
@ -245,6 +245,10 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
|
||||||
if (!llvmpipe->context)
|
if (!llvmpipe->context)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(llvmpipe->context, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create drawing context and plug our rendering stage into it.
|
* Create drawing context and plug our rendering stage into it.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -434,6 +434,9 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
context = LLVMContextCreate();
|
context = LLVMContextCreate();
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(context, false);
|
||||||
|
#endif
|
||||||
gallivm = gallivm_create("test_module", context, NULL);
|
gallivm = gallivm_create("test_module", context, NULL);
|
||||||
|
|
||||||
test_func = build_unary_test_func(gallivm, test, length, test_name);
|
test_func = build_unary_test_func(gallivm, test, length, test_name);
|
||||||
|
|
|
@ -452,6 +452,9 @@ test_one(unsigned verbose,
|
||||||
dump_blend_type(stdout, blend, type);
|
dump_blend_type(stdout, blend, type);
|
||||||
|
|
||||||
context = LLVMContextCreate();
|
context = LLVMContextCreate();
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(context, false);
|
||||||
|
#endif
|
||||||
gallivm = gallivm_create("test_module", context, NULL);
|
gallivm = gallivm_create("test_module", context, NULL);
|
||||||
|
|
||||||
func = add_blend_test(gallivm, blend, type);
|
func = add_blend_test(gallivm, blend, type);
|
||||||
|
|
|
@ -221,6 +221,9 @@ test_one(unsigned verbose,
|
||||||
}
|
}
|
||||||
|
|
||||||
context = LLVMContextCreate();
|
context = LLVMContextCreate();
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(context, false);
|
||||||
|
#endif
|
||||||
gallivm = gallivm_create("test_module", context, NULL);
|
gallivm = gallivm_create("test_module", context, NULL);
|
||||||
|
|
||||||
func = add_conv_test(gallivm, src_type, num_srcs, dst_type, num_dsts);
|
func = add_conv_test(gallivm, src_type, num_srcs, dst_type, num_dsts);
|
||||||
|
|
|
@ -150,6 +150,9 @@ test_format_float(unsigned verbose, FILE *fp,
|
||||||
unsigned i, j, k, l;
|
unsigned i, j, k, l;
|
||||||
|
|
||||||
context = LLVMContextCreate();
|
context = LLVMContextCreate();
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(context, false);
|
||||||
|
#endif
|
||||||
gallivm = gallivm_create("test_module_float", context, NULL);
|
gallivm = gallivm_create("test_module_float", context, NULL);
|
||||||
|
|
||||||
fetch = add_fetch_rgba_test(gallivm, verbose, desc,
|
fetch = add_fetch_rgba_test(gallivm, verbose, desc,
|
||||||
|
@ -251,6 +254,9 @@ test_format_unorm8(unsigned verbose, FILE *fp,
|
||||||
unsigned i, j, k, l;
|
unsigned i, j, k, l;
|
||||||
|
|
||||||
context = LLVMContextCreate();
|
context = LLVMContextCreate();
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(context, false);
|
||||||
|
#endif
|
||||||
gallivm = gallivm_create("test_module_unorm8", context, NULL);
|
gallivm = gallivm_create("test_module_unorm8", context, NULL);
|
||||||
|
|
||||||
fetch = add_fetch_rgba_test(gallivm, verbose, desc,
|
fetch = add_fetch_rgba_test(gallivm, verbose, desc,
|
||||||
|
|
|
@ -96,6 +96,9 @@ test_printf(unsigned verbose, FILE *fp,
|
||||||
boolean success = TRUE;
|
boolean success = TRUE;
|
||||||
|
|
||||||
context = LLVMContextCreate();
|
context = LLVMContextCreate();
|
||||||
|
#if LLVM_VERSION_MAJOR >= 15
|
||||||
|
LLVMContextSetOpaquePointers(context, false);
|
||||||
|
#endif
|
||||||
gallivm = gallivm_create("test_module", context, NULL);
|
gallivm = gallivm_create("test_module", context, NULL);
|
||||||
|
|
||||||
test = add_printf_test(gallivm);
|
test = add_printf_test(gallivm);
|
||||||
|
|
Loading…
Reference in New Issue