lavapipe: Fail device enumeration when DRAW_USE_LLVM=0 is set

DRAW_USE_LLVM=0 is not supported and crashes.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35036>
This commit is contained in:
Konstantin Seurer 2025-05-17 10:59:15 +02:00 committed by Marge Bot
parent 072e6d1ab5
commit 8edee1e25b

View file

@ -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);