diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 96c257d1172..4f952e0e17c 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -793,6 +793,11 @@ draw_llvm_create(struct draw_context *draw, LLVMContextRef context) llvm->context = context; if (!llvm->context) { llvm->context = LLVMContextCreate(); + +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(llvm->context, false); +#endif + llvm->context_owned = true; } if (!llvm->context) diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 82e5c742055..9fa1b535a2a 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -245,6 +245,10 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv, if (!llvmpipe->context) goto fail; +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(llvmpipe->context, false); +#endif + /* * Create drawing context and plug our rendering stage into it. */ diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c index dc172f73fbe..55ced4c67cc 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c @@ -434,6 +434,9 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned } context = LLVMContextCreate(); +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(context, false); +#endif gallivm = gallivm_create("test_module", context, NULL); test_func = build_unary_test_func(gallivm, test, length, test_name); diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index a549b0a22ff..7805ec58d98 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -452,6 +452,9 @@ test_one(unsigned verbose, dump_blend_type(stdout, blend, type); context = LLVMContextCreate(); +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(context, false); +#endif gallivm = gallivm_create("test_module", context, NULL); func = add_blend_test(gallivm, blend, type); diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c index d040ea3f978..9ae148866af 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_conv.c +++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c @@ -221,6 +221,9 @@ test_one(unsigned verbose, } context = LLVMContextCreate(); +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(context, false); +#endif gallivm = gallivm_create("test_module", context, NULL); func = add_conv_test(gallivm, src_type, num_srcs, dst_type, num_dsts); diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c index f8013fe2d25..f1b485a13c8 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_format.c +++ b/src/gallium/drivers/llvmpipe/lp_test_format.c @@ -150,6 +150,9 @@ test_format_float(unsigned verbose, FILE *fp, unsigned i, j, k, l; context = LLVMContextCreate(); +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(context, false); +#endif gallivm = gallivm_create("test_module_float", context, NULL); fetch = add_fetch_rgba_test(gallivm, verbose, desc, @@ -251,6 +254,9 @@ test_format_unorm8(unsigned verbose, FILE *fp, unsigned i, j, k, l; context = LLVMContextCreate(); +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(context, false); +#endif gallivm = gallivm_create("test_module_unorm8", context, NULL); fetch = add_fetch_rgba_test(gallivm, verbose, desc, diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c index 85ce1cda695..b3de9cb9e8b 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_printf.c +++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c @@ -96,6 +96,9 @@ test_printf(unsigned verbose, FILE *fp, boolean success = TRUE; context = LLVMContextCreate(); +#if LLVM_VERSION_MAJOR >= 15 + LLVMContextSetOpaquePointers(context, false); +#endif gallivm = gallivm_create("test_module", context, NULL); test = add_printf_test(gallivm);