pipe-loader: conditionally build and use pipe_loader_sw_probe_dri
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 1 Apr 2014 16:42:40 +0000 (17:42 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 25 Apr 2014 20:09:09 +0000 (21:09 +0100)
The function relies on the sw/dri winsys which is build only when --enable-dri
is set. Fixes build issues with the following config

 ./configure --disable-dri --with-gallium-drivers=svga --enable-xa

Issue can be reproduced with any hw gallium driver + st that uses the pipe-loader.

Cc: Brian Paul <brianp@vmware.com>
Reported-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
configure.ac
src/gallium/auxiliary/pipe-loader/pipe_loader.h
src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c

index c71fa2627817229582ac3975adb4c9162ac7471e..b18f8cceba78b323aab9d9767cdc4a03527af689 100644 (file)
@@ -1941,6 +1941,10 @@ if test "x$enable_gallium_loader" = xyes; then
         GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
     fi
 
+    if test "x$enable_dri" = xyes; then
+        GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_DRI"
+    fi
+
     if test "x$enable_gallium_drm_loader" = xyes; then
         GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_DRM"
         PKG_CHECK_MODULES([GALLIUM_PIPE_LOADER_XCB], [xcb xcb-dri2],
index a5e49fc2c1a3d7050c5a3a3cb36f7f6c15e4b126..caef6c16bec9957a3da85d49c91e75266307f46b 100644 (file)
@@ -119,6 +119,9 @@ pipe_loader_sw_probe_xlib(struct pipe_loader_device **devs, Display *display);
 
 #endif
 
+
+#ifdef HAVE_PIPE_LOADER_DRI
+
 /**
  * Initialize sw dri device give the drisw_loader_funcs.
  *
@@ -130,6 +133,7 @@ bool
 pipe_loader_sw_probe_dri(struct pipe_loader_device **devs,
                          struct drisw_loader_funcs *drisw_lf);
 
+#endif
 
 /**
  * Initialize a null sw device.
index 35ec37fa2db98ce61d9b49bb5722357e049b9a24..08d43538efef16f3154498fb6eb460c133d85417 100644 (file)
@@ -75,6 +75,7 @@ pipe_loader_sw_probe_xlib(struct pipe_loader_device **devs, Display *display)
 }
 #endif
 
+#ifdef HAVE_PIPE_LOADER_DRI
 bool
 pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, struct drisw_loader_funcs *drisw_lf)
 {
@@ -95,6 +96,7 @@ pipe_loader_sw_probe_dri(struct pipe_loader_device **devs, struct drisw_loader_f
 
    return true;
 }
+#endif
 
 bool
 pipe_loader_sw_probe_null(struct pipe_loader_device **devs)