diff options
Diffstat (limited to 'user/mesa-amber')
-rw-r--r-- | user/mesa-amber/APKBUILD | 8 | ||||
-rw-r--r-- | user/mesa-amber/mesa-amber-i915c.patch | 46 |
2 files changed, 53 insertions, 1 deletions
diff --git a/user/mesa-amber/APKBUILD b/user/mesa-amber/APKBUILD index 080fdb348..9855b035d 100644 --- a/user/mesa-amber/APKBUILD +++ b/user/mesa-amber/APKBUILD @@ -17,6 +17,7 @@ subpackages="" install_if="mesa-dri" source="https://mesa.freedesktop.org/archive/mesa-$pkgver.tar.xz big-endian-flipping.patch + mesa-amber-i915c.patch no-tls.patch nouveau-flush-fix.patch " @@ -45,6 +46,7 @@ build() { -Ddri-drivers=$_dri_drivers \ -Ddri-drivers-path=$_dri_driverdir \ -Ddri3=enabled \ + -Dgbm=disabled \ -Dglvnd=true \ -Dllvm=disabled \ -Dosmesa=false \ @@ -59,8 +61,12 @@ build() { package() { DESTDIR="$pkgdir" meson install -C build + if [ -f "$pkgdir"/usr/lib/xorg/modules/dri/i915_dri.so ]; then + # Prevent file conflict with mesa-dri. + mv "$pkgdir"/usr/lib/xorg/modules/dri/i915_dri.so \ + "$pkgdir"/usr/lib/xorg/modules/dri/i915c_dri.so + fi rm -rf "$pkgdir"/usr/include - rm -rf "$pkgdir"/usr/lib/libgbm.so* rm -rf "$pkgdir"/usr/lib/libglapi.so* rm -rf "$pkgdir"/usr/lib/pkgconfig rm -rf "$pkgdir"/usr/share/drirc.d diff --git a/user/mesa-amber/mesa-amber-i915c.patch b/user/mesa-amber/mesa-amber-i915c.patch new file mode 100644 index 000000000..826f8cb3c --- /dev/null +++ b/user/mesa-amber/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 |