diff options
author | Matt Turner <mattst88@gentoo.org> | 2023-05-12 13:37:34 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2023-05-12 13:38:25 -0400 |
commit | 01cb5b2658d9421ab5a35e6a36c29e305e68c8f4 (patch) | |
tree | b95636cf5e00cc7b5577598d40194afde0bc1e7c /media-libs/mesa-amber | |
parent | media-libs/mesa-amber: Bump to EAPI=8 (diff) | |
download | gentoo-01cb5b2658d9421ab5a35e6a36c29e305e68c8f4.tar.gz gentoo-01cb5b2658d9421ab5a35e6a36c29e305e68c8f4.tar.bz2 gentoo-01cb5b2658d9421ab5a35e6a36c29e305e68c8f4.zip |
media-libs/mesa-amber: Fix loading i915c driver
Thanks to Allan Mondor <bugs.gentoo@acmondor.ca> for the patch.
Closes: https://bugs.gentoo.org/866425
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs/mesa-amber')
-rw-r--r-- | media-libs/mesa-amber/files/mesa-amber-i915c.patch | 46 | ||||
-rw-r--r-- | media-libs/mesa-amber/mesa-amber-21.3.9-r1.ebuild (renamed from media-libs/mesa-amber/mesa-amber-21.3.9.ebuild) | 4 |
2 files changed, 50 insertions, 0 deletions
diff --git a/media-libs/mesa-amber/files/mesa-amber-i915c.patch b/media-libs/mesa-amber/files/mesa-amber-i915c.patch new file mode 100644 index 000000000000..826f8cb3ca86 --- /dev/null +++ b/media-libs/mesa-amber/files/mesa-amber-i915c.patch @@ -0,0 +1,46 @@ + +This patch is fixed the issue created when /usr/lib/dri/i915_dri.so is renamed to /usr/lib/dri/i915c_dri.so +by mesa-amber/mesa-amber-21.3.9.ebuild + +Without this patch the driver cannot be loaded using the environment variable MESA_LOADER_DRIVER_OVERRIDE="i915c" +as that mechanism expects to find the __driDriverGetExtensions_i915c: + +MESA-LOADER: dlopen(/usr/lib/dri/i915c_dri.so) +MESA-LOADER: driver does not expose __driDriverGetExtensions_i915c(): /usr/lib/dri/i915c_dri.so: undefined symbol: __driDriverGetExtensions_i915c +MESA-LOADER: dlopen(/usr/lib/dri/swrast_dri.so) + +This patch adds the __driDriverGetExtensions_i915c symbol by simply cloning the code for the original +__driDriverGetExtensions_i915 symbol. + +Allan Mondor +bugs.gentoo@acmondor.ca + + +diff -w -ruN mesa-21.3.9.org/src/mesa/drivers/dri/i915/intel_screen.c mesa-21.3.9/src/mesa/drivers/dri/i915/intel_screen.c +--- mesa-21.3.9.org/src/mesa/drivers/dri/i915/intel_screen.c 2022-06-08 12:13:35.000000000 -0600 ++++ mesa-21.3.9/src/mesa/drivers/dri/i915/intel_screen.c 2022-08-23 11:32:19.151578025 -0600 +@@ -1290,6 +1290,13 @@ + return i915_driver_extensions; + } + ++PUBLIC const __DRIextension **__driDriverGetExtensions_i915c(void) ++{ ++ globalDriverAPI = &i915_driver_api; ++ ++ return i915_driver_extensions; ++} ++ + PUBLIC const __DRIextension **__driDriverGetExtensions_i830(void) + { + globalDriverAPI = &i915_driver_api; +diff -w -ruN mesa-21.3.9.org/src/mesa/drivers/dri/i915/intel_screen.h mesa-21.3.9/src/mesa/drivers/dri/i915/intel_screen.h +--- mesa-21.3.9.org/src/mesa/drivers/dri/i915/intel_screen.h 2022-06-08 12:13:35.000000000 -0600 ++++ mesa-21.3.9/src/mesa/drivers/dri/i915/intel_screen.h 2022-08-23 11:31:54.047576393 -0600 +@@ -160,6 +160,7 @@ + + const __DRIextension **__driDriverGetExtensions_i830(void); + const __DRIextension **__driDriverGetExtensions_i915(void); ++const __DRIextension **__driDriverGetExtensions_i915c(void); + extern const __DRI2fenceExtension intelFenceExtension; + + extern GLboolean diff --git a/media-libs/mesa-amber/mesa-amber-21.3.9.ebuild b/media-libs/mesa-amber/mesa-amber-21.3.9-r1.ebuild index 6c7e27f41616..9c94daeeb8f3 100644 --- a/media-libs/mesa-amber/mesa-amber-21.3.9.ebuild +++ b/media-libs/mesa-amber/mesa-amber-21.3.9-r1.ebuild @@ -94,6 +94,10 @@ x86? ( usr/lib/libGLX_amber.so.0.0.0 )" +PATCHES=( + "${FILESDIR}"/${PN}-i915c.patch +) + python_check_deps() { python_has_version ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" } |