Mesa (main): gallium: Move -DHAVE_PIPE_LOADER_DRI and -DHAVE_PIPE_LOADER_KMS to be pre_args

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 29 13:45:13 UTC 2022


Module: Mesa
Branch: main
Commit: 34572042c792fe1cb58e233f9c5a6e8ed93a9d7b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=34572042c792fe1cb58e233f9c5a6e8ed93a9d7b

Author: Yonggang Luo <luoyonggang at gmail.com>
Date:   Thu Jul 28 13:54:55 2022 +0800

gallium:  Move -DHAVE_PIPE_LOADER_DRI and -DHAVE_PIPE_LOADER_KMS to be pre_args

There is non pipe-loader source code depends on it.
After doing this, we found that shared library pipe_swrast depends on libswdri
The error message is:
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'dri_create_sw_winsys'
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'kms_dri_create_winsys'

Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>

---

 meson.build                                   | 7 +++++++
 src/gallium/auxiliary/pipe-loader/meson.build | 6 ------
 src/gallium/targets/pipe-loader/meson.build   | 2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/meson.build b/meson.build
index a3724a16551..ae596676b84 100644
--- a/meson.build
+++ b/meson.build
@@ -1689,6 +1689,13 @@ if dep_libdrm.found()
   endif
 endif
 
+if with_dri
+  pre_args += '-DHAVE_PIPE_LOADER_DRI'
+endif
+if with_gallium_drisw_kms
+  pre_args += '-DHAVE_PIPE_LOADER_KMS'
+endif
+
 dep_libudev = dependency('libudev', required : false)
 if dep_libudev.found()
   pre_args += '-DHAVE_LIBUDEV'
diff --git a/src/gallium/auxiliary/pipe-loader/meson.build b/src/gallium/auxiliary/pipe-loader/meson.build
index 988947195ec..1c768e73b62 100644
--- a/src/gallium/auxiliary/pipe-loader/meson.build
+++ b/src/gallium/auxiliary/pipe-loader/meson.build
@@ -33,12 +33,6 @@ if dep_libdrm.found()
   files_pipe_loader += files('pipe_loader_drm.c')
   libpipe_loader_links += libloader
 endif
-if with_dri
-  libpipe_loader_defines += '-DHAVE_PIPE_LOADER_DRI'
-endif
-if with_gallium_drisw_kms
-  libpipe_loader_defines += '-DHAVE_PIPE_LOADER_KMS'
-endif
 
 libpipe_loader_static = static_library(
   'pipe_loader_static',
diff --git a/src/gallium/targets/pipe-loader/meson.build b/src/gallium/targets/pipe-loader/meson.build
index 291c4844906..59484ae8a65 100644
--- a/src/gallium/targets/pipe-loader/meson.build
+++ b/src/gallium/targets/pipe-loader/meson.build
@@ -67,7 +67,7 @@ pipe_loaders = [
   [with_gallium_freedreno, 'msm', driver_freedreno, []],
   [with_gallium_kmsro, 'kmsro', _kmsro_targets, []],
   [with_gallium_svga, 'vmwgfx', driver_svga, []],
-  [with_gallium_softpipe, 'swrast', driver_swrast, [libwsw, libws_null]],
+  [with_gallium_softpipe, 'swrast', driver_swrast, [libwsw, libws_null, libswdri, libswkmsdri]],
 ]
 
 foreach x : pipe_loaders



More information about the mesa-commit mailing list