From 5259e83b1e6d1d0faf5a33cfd9b9ffd788ffe15f Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 28 Jul 2022 16:12:49 +0800 Subject: [PATCH] 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 Reviewed-by: Eric Engestrom Reviewed-by: Adam Jackson Part-of: --- meson.build | 4 ++++ src/gallium/frontends/dri/dri_util.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git meson.build meson.build index cdff0312e56..ff06cab8281 100644 --- meson.build +++ meson.build @@ -1637,6 +1637,10 @@ if dep_libdrm.found() endif endif +if with_dri2 + pre_args += '-DHAVE_DRI2' +endif + dep_libudev = dependency('libudev', required : false) if dep_libudev.found() pre_args += '-DHAVE_LIBUDEV' diff --git src/gallium/frontends/dri/dri_util.c src/gallium/frontends/dri/dri_util.c index 8d60526f45b..f96847098e4 100644 --- src/gallium/frontends/dri/dri_util.c +++ src/gallium/frontends/dri/dri_util.c @@ -808,6 +808,8 @@ const __DRIcoreExtension driCoreExtension = { .unbindContext = driUnbindContext }; +#if HAVE_DRI2 + /** DRI2 interface */ const __DRIdri2Extension driDRI2Extension = { .base = { __DRI_DRI2, 4 }, @@ -837,6 +839,8 @@ const __DRIdri2Extension swkmsDRI2Extension = { .createNewScreen2 = driCreateNewScreen2, }; +#endif + const __DRIswrastExtension driSWRastExtension = { .base = { __DRI_SWRAST, 4 }, -- 2.37.1