From 8edee1e25b62aa0a60dfa060f68c35cf4e60f59e Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sat, 17 May 2025 10:59:15 +0200 Subject: [PATCH] lavapipe: Fail device enumeration when DRAW_USE_LLVM=0 is set DRAW_USE_LLVM=0 is not supported and crashes. Acked-by: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index c0e39e2b252..2daf5cb5f61 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -34,6 +34,7 @@ #include "pipe/p_defines.h" #include "pipe/p_state.h" #include "pipe/p_context.h" +#include "draw/draw_context.h" #include "frontend/drisw_api.h" #include "util/u_inlines.h" @@ -1459,6 +1460,9 @@ static struct drisw_loader_funcs lvp_sw_lf = { static VkResult lvp_enumerate_physical_devices(struct vk_instance *vk_instance) { + if (!draw_get_option_use_llvm()) + return VK_SUCCESS; + struct lvp_instance *instance = container_of(vk_instance, struct lvp_instance, vk);