From 6d3ded799550d447aaef4de52c017c3feb32b786 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 4 Mar 2021 15:49:51 +1000 Subject: [PATCH] lavapipe: add support for non-dri loader on linux If you build --glx=gallium-xlib then lavapipe will fail to link this should let it use the non-dri paths on Linux in that case Reviewed-by: Erik Faye-Lund Tested-by: Brian Paul Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 308b3707b13..e6759f60907 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -273,7 +273,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_DestroyInstance( vk_free(&instance->vk.alloc, instance); } -#ifndef _WIN32 +#if defined(HAVE_PIPE_LOADER_DRI) static void lvp_get_image(struct dri_drawable *dri_drawable, int x, int y, unsigned width, unsigned height, unsigned stride, void *data) @@ -314,10 +314,10 @@ lvp_enumerate_physical_devices(struct lvp_instance *instance) assert(instance->num_devices == 1); -#ifdef _WIN32 - pipe_loader_sw_probe_null(&instance->devs); -#else +#if defined(HAVE_PIPE_LOADER_DRI) pipe_loader_sw_probe_dri(&instance->devs, &lvp_sw_lf); +#else + pipe_loader_sw_probe_null(&instance->devs); #endif result = lvp_physical_device_init(&instance->physicalDevice,