Mesa (master): lavapipe: add support for non-dri loader on linux

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 20 01:10:19 UTC 2021


Module: Mesa
Branch: master
Commit: 6d3ded799550d447aaef4de52c017c3feb32b786
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d3ded799550d447aaef4de52c017c3feb32b786

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Mar  4 15:49:51 2021 +1000

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 <erik.faye-lund at collabora.com>
Tested-by: Brian Paul <brianp at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9400>

---

 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,



More information about the mesa-commit mailing list