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

Author: Yonggang Luo <[email protected]>
Date:   Thu Jul 28 16:12:49 2022 +0800

gallium: Disable dri2 interface on OSX

Error message:
Undefined symbols for architecture x86_64:
  "_dri_kms_driver_extensions", referenced from:
      _swkmsCreateNewScreen in libdri.a(dri_util.c.o)
  "_galliumdrm_driver_extensions", referenced from:
      _dri2CreateNewScreen in libdri.a(dri_util.c.o)
ld: symbol(s) not found for architecture x86_64

Fixes: b6f7a4836ab ("dri: Fill in the driver extensions for the legacy 
createNewScreen paths")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519

Signed-off-by: Yonggang Luo <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>

---

 meson.build                          | 3 +++
 src/gallium/frontends/dri/dri_util.c | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/meson.build b/meson.build
index 6be3105cc3b..1e9dc44bd60 100644
--- a/meson.build
+++ b/meson.build
@@ -1692,6 +1692,9 @@ endif
 if with_dri
   pre_args += '-DHAVE_DRI'
 endif
+if with_dri2
+  pre_args += '-DHAVE_DRI2'
+endif
 if with_gallium_drisw_kms
   pre_args += '-DHAVE_DRISW_KMS'
 endif
diff --git a/src/gallium/frontends/dri/dri_util.c 
b/src/gallium/frontends/dri/dri_util.c
index 8eeeed03add..97add11779a 100644
--- a/src/gallium/frontends/dri/dri_util.c
+++ b/src/gallium/frontends/dri/dri_util.c
@@ -963,6 +963,8 @@ const __DRIcoreExtension driCoreExtension = {
     .unbindContext              = driUnbindContext
 };
 
+#if HAVE_DRI2
+
 /** DRI2 interface */
 const __DRIdri2Extension driDRI2Extension = {
     .base = { __DRI_DRI2, 4 },
@@ -992,6 +994,8 @@ const __DRIdri2Extension swkmsDRI2Extension = {
     .createNewScreen2           = driCreateNewScreen2,
 };
 
+#endif
+
 const __DRIswrastExtension driSWRastExtension = {
     .base = { __DRI_SWRAST, 4 },
 

Reply via email to