From fe5f983832aa9917be87a1be111074f8da2c6b85 Mon Sep 17 00:00:00 2001 From: Dave Hughes Date: Sun, 26 Jan 2025 19:42:48 +0000 Subject: [PATCH 1/5] components/x11/mesa: don't build r600 gallium driver Temporarily disable until both dri and gallium drivers are confirmed working. Afterwards we can begin further enablement of drivers. --- components/x11/mesa/Makefile | 6 +++--- components/x11/mesa/manifests/sample-manifest.p5m | 12 ------------ components/x11/mesa/mesa.p5m | 12 ------------ 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/components/x11/mesa/Makefile b/components/x11/mesa/Makefile index 234a74abf22..d9208a12489 100644 --- a/components/x11/mesa/Makefile +++ b/components/x11/mesa/Makefile @@ -49,7 +49,7 @@ CONFIGURE_OPTIONS += --libdir='lib/mesa/amd64' PKG_HARDLINKS += usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so # Command line options to GNU autoconf configure script -CONFIGURE_OPTIONS += -Dgallium-drivers='swrast, i915, r600' +CONFIGURE_OPTIONS += -Dgallium-drivers='swrast, i915' CONFIGURE_OPTIONS += -Dvulkan-drivers='' CONFIGURE_OPTIONS += -Dgbm=enabled CONFIGURE_OPTIONS += -Dglvnd=false @@ -63,7 +63,7 @@ CONFIGURE_OPTIONS += -Dgles1=enabled CONFIGURE_OPTIONS += -Dgles2=enabled CONFIGURE_OPTIONS += -Dosmesa=true CONFIGURE_OPTIONS += -Dshared-glapi=enabled -CONFIGURE_OPTIONS += -Dgallium-xvmc=enabled +CONFIGURE_OPTIONS += -Dgallium-xvmc=disabled CONFIGURE_OPTIONS += -Dgallium-xa=enabled CONFIGURE_OPTIONS += -Ddri-drivers='' CONFIGURE_OPTIONS += -Ddri-drivers-path='$(X11_SERVERMODS_DIR)/dri$(SERVERMOD_SUBDIR)' @@ -88,7 +88,7 @@ CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)" # Add RPATH to xorg lib directory where is libdrm. COMPONENT_POST_INSTALL_ACTION.64 += \ - for f in libgbm.so.1.0.0 libEGL.so.1.0.0 libGL.so.1.2.0 libxatracker.so.2.5.0 libXvMCr600.so.1.0.0 vdpau/libvdpau_r600.so.1.0.0; do \ + for f in libgbm.so.1.0.0 libEGL.so.1.0.0 libGL.so.1.2.0 libxatracker.so.2.5.0; do \ elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR)" \ $(PROTOUSRLIBDIR)/mesa/$(MACH64)/$$f ; \ done ; \ diff --git a/components/x11/mesa/manifests/sample-manifest.p5m b/components/x11/mesa/manifests/sample-manifest.p5m index 08a74b957f4..d9d4a8550b8 100644 --- a/components/x11/mesa/manifests/sample-manifest.p5m +++ b/components/x11/mesa/manifests/sample-manifest.p5m @@ -70,10 +70,6 @@ file path=usr/lib/mesa/$(MACH64)/libGLESv2.so.2.0.0 link path=usr/lib/mesa/$(MACH64)/libOSMesa.so target=libOSMesa.so.8 link path=usr/lib/mesa/$(MACH64)/libOSMesa.so.8 target=libOSMesa.so.8.0.0 file path=usr/lib/mesa/$(MACH64)/libOSMesa.so.8.0.0 -link path=usr/lib/mesa/$(MACH64)/libXvMCr600.so target=libXvMCr600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/libXvMCr600.so.1 target=libXvMCr600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/libXvMCr600.so.1.0 target=libXvMCr600.so.1.0.0 -file path=usr/lib/mesa/$(MACH64)/libXvMCr600.so.1.0.0 link path=usr/lib/mesa/$(MACH64)/libgbm.so target=libgbm.so.1 link path=usr/lib/mesa/$(MACH64)/libgbm.so.1 target=libgbm.so.1.0.0 file path=usr/lib/mesa/$(MACH64)/libgbm.so.1.0.0 @@ -91,15 +87,7 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv1_cm.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv2.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/xatracker.pc -link path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so \ - target=libvdpau_r600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so.1 \ - target=libvdpau_r600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so.1.0 \ - target=libvdpau_r600.so.1.0.0 -file path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so.1.0.0 hardlink path=usr/lib/xorg/modules/dri/$(MACH64/i915_dri.so target=kms_swrast_dri.so file path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so -hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/r600_dri.so target=kms_swrast_dri.so hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/swrast_dri.so target=kms_swrast_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf diff --git a/components/x11/mesa/mesa.p5m b/components/x11/mesa/mesa.p5m index 580d81d1e01..238c3dd30c8 100644 --- a/components/x11/mesa/mesa.p5m +++ b/components/x11/mesa/mesa.p5m @@ -119,10 +119,6 @@ file path=usr/lib/mesa/$(MACH64)/libGLESv2.so.2.0.0 link path=usr/lib/mesa/$(MACH64)/libOSMesa.so target=libOSMesa.so.8 link path=usr/lib/mesa/$(MACH64)/libOSMesa.so.8 target=libOSMesa.so.8.0.0 file path=usr/lib/mesa/$(MACH64)/libOSMesa.so.8.0.0 -link path=usr/lib/mesa/$(MACH64)/libXvMCr600.so target=libXvMCr600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/libXvMCr600.so.1 target=libXvMCr600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/libXvMCr600.so.1.0 target=libXvMCr600.so.1.0.0 -file path=usr/lib/mesa/$(MACH64)/libXvMCr600.so.1.0.0 link path=usr/lib/mesa/$(MACH64)/libgbm.so target=libgbm.so.1 link path=usr/lib/mesa/$(MACH64)/libgbm.so.1 target=libgbm.so.1.0.0 file path=usr/lib/mesa/$(MACH64)/libgbm.so.1.0.0 @@ -140,15 +136,7 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv1_cm.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv2.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/xatracker.pc -link path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so \ - target=libvdpau_r600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so.1 \ - target=libvdpau_r600.so.1.0.0 -link path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so.1.0 \ - target=libvdpau_r600.so.1.0.0 -file path=usr/lib/mesa/$(MACH64)/vdpau/libvdpau_r600.so.1.0.0 file path=usr/lib/xorg/modules/dri/$(MACH64)/i915_dri.so hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so target=i915_dri.so -hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/r600_dri.so target=i915_dri.so hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/swrast_dri.so target=i915_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf From 7f6da14a776be87ffa17192830d6bb32a0a37bf5 Mon Sep 17 00:00:00 2001 From: Dave Hughes Date: Sun, 26 Jan 2025 19:43:23 +0000 Subject: [PATCH 2/5] components/x11/mesa: fix erroneous linking of kms_swrast_dri note: swrast_dri.so (traditional swrast dri driver) no longer exists as of Mesa v21. The compatibility symlink currently results in a broken setup due to gallium not yet working. We remove it for now. Mesa 24 introduces 'libdril' a compatibility stub for the legacy DRI loader interface, see https://gitlab.freedesktop/mesa/mesa/-/merge_requests/28378 We can add libdril when we update to Mesa 24. note2: xorg-server will complain about missing swrast_dri.so - there is nothing we can do about that right now. xorg vesa driver will still work. --- components/x11/mesa/Makefile | 6 ++++-- components/x11/mesa/manifests/sample-manifest.p5m | 1 - components/x11/mesa/mesa.p5m | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/x11/mesa/Makefile b/components/x11/mesa/Makefile index d9208a12489..5f153c3b84b 100644 --- a/components/x11/mesa/Makefile +++ b/components/x11/mesa/Makefile @@ -46,7 +46,7 @@ X11_SERVERLIBS_DIR= /usr/lib/xorg CONFIGURE_OPTIONS += --libdir='lib/mesa/amd64' -PKG_HARDLINKS += usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so +#PKG_HARDLINKS += usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so # Command line options to GNU autoconf configure script CONFIGURE_OPTIONS += -Dgallium-drivers='swrast, i915' @@ -92,8 +92,10 @@ COMPONENT_POST_INSTALL_ACTION.64 += \ elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR)" \ $(PROTOUSRLIBDIR)/mesa/$(MACH64)/$$f ; \ done ; \ + for f in kms_swrast_dri.so i915_dri.so; do \ elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR)" \ - $(PROTOUSRLIBDIR)/xorg/modules/dri/$(MACH64)/i915_dri.so ; \ + $(PROTOUSRLIBDIR)/xorg/modules/dri/$(MACH64)/$$f ; \ + done ; \ mv $(PROTOUSRDIR)/include/GL $(PROTOUSRDIR)/include/mesa # Manually added build dependencies diff --git a/components/x11/mesa/manifests/sample-manifest.p5m b/components/x11/mesa/manifests/sample-manifest.p5m index d9d4a8550b8..e89a52f9d45 100644 --- a/components/x11/mesa/manifests/sample-manifest.p5m +++ b/components/x11/mesa/manifests/sample-manifest.p5m @@ -89,5 +89,4 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/xatracker.pc hardlink path=usr/lib/xorg/modules/dri/$(MACH64/i915_dri.so target=kms_swrast_dri.so file path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so -hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/swrast_dri.so target=kms_swrast_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf diff --git a/components/x11/mesa/mesa.p5m b/components/x11/mesa/mesa.p5m index 238c3dd30c8..f326c33e045 100644 --- a/components/x11/mesa/mesa.p5m +++ b/components/x11/mesa/mesa.p5m @@ -137,6 +137,5 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv2.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/xatracker.pc file path=usr/lib/xorg/modules/dri/$(MACH64)/i915_dri.so -hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so target=i915_dri.so -hardlink path=usr/lib/xorg/modules/dri/$(MACH64)/swrast_dri.so target=i915_dri.so +file path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf From 66fb8c517aa65289a00bd22f654592203533f69b Mon Sep 17 00:00:00 2001 From: Dave Hughes Date: Sun, 26 Jan 2025 19:43:49 +0000 Subject: [PATCH 3/5] components/x11/mesa: build i915 driver instead of gallium driver Revert to i915 dri driver. We can enable i915g gallium driver in future, or use the crocus driver. For now we retain i915 as a legacy dri driver. note: currently broken. Xorg log shows EE for no devices found. I read this to be an error with libdrm as a result of our update in 2024. --- components/x11/mesa/Makefile | 8 ++++---- components/x11/mesa/manifests/sample-manifest.p5m | 9 +-------- components/x11/mesa/mesa.p5m | 8 -------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/components/x11/mesa/Makefile b/components/x11/mesa/Makefile index 5f153c3b84b..b1c4d5c1df6 100644 --- a/components/x11/mesa/Makefile +++ b/components/x11/mesa/Makefile @@ -49,7 +49,7 @@ CONFIGURE_OPTIONS += --libdir='lib/mesa/amd64' #PKG_HARDLINKS += usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so # Command line options to GNU autoconf configure script -CONFIGURE_OPTIONS += -Dgallium-drivers='swrast, i915' +CONFIGURE_OPTIONS += -Dgallium-drivers='swrast' CONFIGURE_OPTIONS += -Dvulkan-drivers='' CONFIGURE_OPTIONS += -Dgbm=enabled CONFIGURE_OPTIONS += -Dglvnd=false @@ -64,8 +64,8 @@ CONFIGURE_OPTIONS += -Dgles2=enabled CONFIGURE_OPTIONS += -Dosmesa=true CONFIGURE_OPTIONS += -Dshared-glapi=enabled CONFIGURE_OPTIONS += -Dgallium-xvmc=disabled -CONFIGURE_OPTIONS += -Dgallium-xa=enabled -CONFIGURE_OPTIONS += -Ddri-drivers='' +CONFIGURE_OPTIONS += -Dgallium-xa=disabled +CONFIGURE_OPTIONS += -Ddri-drivers='i915' CONFIGURE_OPTIONS += -Ddri-drivers-path='$(X11_SERVERMODS_DIR)/dri$(SERVERMOD_SUBDIR)' CONFIGURE_OPTIONS += -Delf-tls=false @@ -88,7 +88,7 @@ CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)" # Add RPATH to xorg lib directory where is libdrm. COMPONENT_POST_INSTALL_ACTION.64 += \ - for f in libgbm.so.1.0.0 libEGL.so.1.0.0 libGL.so.1.2.0 libxatracker.so.2.5.0; do \ + for f in libgbm.so.1.0.0 libEGL.so.1.0.0 libGL.so.1.2.0; do \ elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR)" \ $(PROTOUSRLIBDIR)/mesa/$(MACH64)/$$f ; \ done ; \ diff --git a/components/x11/mesa/manifests/sample-manifest.p5m b/components/x11/mesa/manifests/sample-manifest.p5m index e89a52f9d45..fba25b8603d 100644 --- a/components/x11/mesa/manifests/sample-manifest.p5m +++ b/components/x11/mesa/manifests/sample-manifest.p5m @@ -52,9 +52,6 @@ file path=usr/include/mesa/internal/dri_interface.h link path=usr/include/GL/internal/dri_interface.h target=../../mesa/internal/dri_interface.h file path=usr/include/mesa/osmesa.h link path=usr/include/GL/osmesa.h target=../mesa/osmesa.h -file path=usr/include/xa_composite.h -file path=usr/include/xa_context.h -file path=usr/include/xa_tracker.h link path=usr/lib/mesa/$(MACH64)/libEGL.so target=libEGL.so.1 link path=usr/lib/mesa/$(MACH64)/libEGL.so.1 target=libEGL.so.1.0.0 file path=usr/lib/mesa/$(MACH64)/libEGL.so.1.0.0 @@ -76,9 +73,6 @@ file path=usr/lib/mesa/$(MACH64)/libgbm.so.1.0.0 link path=usr/lib/mesa/$(MACH64)/libglapi.so target=libglapi.so.0 link path=usr/lib/mesa/$(MACH64)/libglapi.so.0 target=libglapi.so.0.0.0 file path=usr/lib/mesa/$(MACH64)/libglapi.so.0.0.0 -link path=usr/lib/mesa/$(MACH64)/libxatracker.so target=libxatracker.so.2 -link path=usr/lib/mesa/$(MACH64)/libxatracker.so.2 target=libxatracker.so.2.5.0 -file path=usr/lib/mesa/$(MACH64)/libxatracker.so.2.5.0 file path=usr/lib/mesa/$(MACH64)/pkgconfig/dri.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/egl.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/gbm.pc @@ -86,7 +80,6 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/gl.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv1_cm.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv2.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc -file path=usr/lib/mesa/$(MACH64)/pkgconfig/xatracker.pc -hardlink path=usr/lib/xorg/modules/dri/$(MACH64/i915_dri.so target=kms_swrast_dri.so +file path=usr/lib/xorg/modules/dri/$(MACH64/i915_dri.so file path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf diff --git a/components/x11/mesa/mesa.p5m b/components/x11/mesa/mesa.p5m index f326c33e045..3889ceea338 100644 --- a/components/x11/mesa/mesa.p5m +++ b/components/x11/mesa/mesa.p5m @@ -70,7 +70,6 @@ link path=usr/lib/$(MACH64)/pkgconfig/gl.pc target=../../mesa/$(MACH64)/pkgconfi link path=usr/lib/$(MACH64)/pkgconfig/glesv1_cm.pc target=../../mesa/$(MACH64)/pkgconfig/glesv1_cm.pc link path=usr/lib/$(MACH64)/pkgconfig/glesv2.pc target=../../mesa/$(MACH64)/pkgconfig/glesv2.pc link path=usr/lib/$(MACH64)/pkgconfig/osmesa.pc target=../../mesa/$(MACH64)/pkgconfig/osmesa.pc -link path=usr/lib/$(MACH64)/pkgconfig/xatracker.pc target=../../mesa/$(MACH64)/pkgconfig/xatracker.pc file path=usr/include/EGL/egl.h file path=usr/include/EGL/eglext.h @@ -101,9 +100,6 @@ file path=usr/include/mesa/internal/dri_interface.h link path=usr/include/GL/internal/dri_interface.h target=../../mesa/internal/dri_interface.h file path=usr/include/mesa/osmesa.h link path=usr/include/GL/osmesa.h target=../mesa/osmesa.h -file path=usr/include/xa_composite.h -file path=usr/include/xa_context.h -file path=usr/include/xa_tracker.h link path=usr/lib/mesa/$(MACH64)/libEGL.so target=libEGL.so.1 link path=usr/lib/mesa/$(MACH64)/libEGL.so.1 target=libEGL.so.1.0.0 file path=usr/lib/mesa/$(MACH64)/libEGL.so.1.0.0 @@ -125,9 +121,6 @@ file path=usr/lib/mesa/$(MACH64)/libgbm.so.1.0.0 link path=usr/lib/mesa/$(MACH64)/libglapi.so target=libglapi.so.0 link path=usr/lib/mesa/$(MACH64)/libglapi.so.0 target=libglapi.so.0.0.0 file path=usr/lib/mesa/$(MACH64)/libglapi.so.0.0.0 -link path=usr/lib/mesa/$(MACH64)/libxatracker.so target=libxatracker.so.2 -link path=usr/lib/mesa/$(MACH64)/libxatracker.so.2 target=libxatracker.so.2.5.0 -file path=usr/lib/mesa/$(MACH64)/libxatracker.so.2.5.0 file path=usr/lib/mesa/$(MACH64)/pkgconfig/dri.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/egl.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/gbm.pc @@ -135,7 +128,6 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/gl.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv1_cm.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv2.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc -file path=usr/lib/mesa/$(MACH64)/pkgconfig/xatracker.pc file path=usr/lib/xorg/modules/dri/$(MACH64)/i915_dri.so file path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf From 520dc50c6b64dbaff713095baaf17cbad7a9b031 Mon Sep 17 00:00:00 2001 From: Dave Hughes Date: Sun, 26 Jan 2025 19:44:14 +0000 Subject: [PATCH 4/5] components/x11/mesa: enable llvm, subsequently enable gallium note: llvm16 *should* work but is currently broken. This worked until Mesa 21.3.9, thus I am using llvm13 temporarily. see: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8613 note 2: gallium is currently broken but almost working. Upon trying to load kms_swrast_dri there will be an error. Running ::mdb stack on the core will point to a GLESv2 error. --- components/x11/mesa/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/x11/mesa/Makefile b/components/x11/mesa/Makefile index b1c4d5c1df6..d2bb5e87ccb 100644 --- a/components/x11/mesa/Makefile +++ b/components/x11/mesa/Makefile @@ -18,6 +18,8 @@ BUILD_BITS = 64 BUILD_STYLE = meson include ../../../make-rules/shared-macros.mk +CLANG_VERSION = 13 + COMPONENT_NAME= mesa COMPONENT_VERSION= 21.3.9 COMPONENT_REVISION= 2 @@ -56,7 +58,7 @@ CONFIGURE_OPTIONS += -Dglvnd=false # Wayland currently requires linux specific socket options and epoll for events. CONFIGURE_OPTIONS += -Dplatforms='x11' # llvm is disabled due to requiring llvm 16 we do not have 16 -CONFIGURE_OPTIONS += -Dllvm=false +CONFIGURE_OPTIONS += -Dllvm=enabled CONFIGURE_OPTIONS += -Dglx='auto' CONFIGURE_OPTIONS += -Degl=enabled CONFIGURE_OPTIONS += -Dgles1=enabled @@ -88,12 +90,12 @@ CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)" # Add RPATH to xorg lib directory where is libdrm. COMPONENT_POST_INSTALL_ACTION.64 += \ - for f in libgbm.so.1.0.0 libEGL.so.1.0.0 libGL.so.1.2.0; do \ - elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR)" \ + for f in libgbm.so.1.0.0 libEGL.so.1.0.0 libGL.so.1.2.0 libOSMesa.so.8.0.0; do \ + elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR):${CLANG_LIBDIR}" \ $(PROTOUSRLIBDIR)/mesa/$(MACH64)/$$f ; \ done ; \ for f in kms_swrast_dri.so i915_dri.so; do \ - elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR)" \ + elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR):${CLANG_LIBDIR}" \ $(PROTOUSRLIBDIR)/xorg/modules/dri/$(MACH64)/$$f ; \ done ; \ mv $(PROTOUSRDIR)/include/GL $(PROTOUSRDIR)/include/mesa @@ -107,6 +109,7 @@ REQUIRED_PACKAGES += library/graphics/libvdpau # Auto-generated dependencies REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG) REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG) +REQUIRED_PACKAGES += $(CLANG_RUNTIME_PKG) REQUIRED_PACKAGES += compress/zstd REQUIRED_PACKAGES += library/expat REQUIRED_PACKAGES += library/zlib From 37c06ca353835dbbce1194aade19108110fc8465 Mon Sep 17 00:00:00 2001 From: Dave Hughes Date: Sun, 26 Jan 2025 19:44:36 +0000 Subject: [PATCH 5/5] components/x11/mesa: enable crocus and iris gallium drivers neither of these will work until gallium is working. Enable for now as an example of gallium drivers compatible with existing gfx-drm gate. --- components/x11/mesa/Makefile | 6 ++++-- components/x11/mesa/manifests/sample-manifest.p5m | 2 ++ components/x11/mesa/mesa.p5m | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/x11/mesa/Makefile b/components/x11/mesa/Makefile index d2bb5e87ccb..fea5dce887a 100644 --- a/components/x11/mesa/Makefile +++ b/components/x11/mesa/Makefile @@ -51,7 +51,7 @@ CONFIGURE_OPTIONS += --libdir='lib/mesa/amd64' #PKG_HARDLINKS += usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so # Command line options to GNU autoconf configure script -CONFIGURE_OPTIONS += -Dgallium-drivers='swrast' +CONFIGURE_OPTIONS += -Dgallium-drivers='swrast, crocus, iris' CONFIGURE_OPTIONS += -Dvulkan-drivers='' CONFIGURE_OPTIONS += -Dgbm=enabled CONFIGURE_OPTIONS += -Dglvnd=false @@ -70,6 +70,8 @@ CONFIGURE_OPTIONS += -Dgallium-xa=disabled CONFIGURE_OPTIONS += -Ddri-drivers='i915' CONFIGURE_OPTIONS += -Ddri-drivers-path='$(X11_SERVERMODS_DIR)/dri$(SERVERMOD_SUBDIR)' CONFIGURE_OPTIONS += -Delf-tls=false +CONFIGURE_OPTIONS += -Dprefer-crocus=true +CONFIGURE_OPTIONS += -Dprefer-iris=true CFLAGS += $(XPG7MODE) CFLAGS += -Wno-incompatible-pointer-types -D_POSIX_PTHREAD_SEMANTICS @@ -94,7 +96,7 @@ COMPONENT_POST_INSTALL_ACTION.64 += \ elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR):${CLANG_LIBDIR}" \ $(PROTOUSRLIBDIR)/mesa/$(MACH64)/$$f ; \ done ; \ - for f in kms_swrast_dri.so i915_dri.so; do \ + for f in kms_swrast_dri.so i915_dri.so crocus_dri.so iris_dri.so; do \ elfedit -e "dyn:runpath /usr/lib/mesa/$(MACH64):/usr/lib/xorg/$(MACH64):$(GCC_LIBDIR):${CLANG_LIBDIR}" \ $(PROTOUSRLIBDIR)/xorg/modules/dri/$(MACH64)/$$f ; \ done ; \ diff --git a/components/x11/mesa/manifests/sample-manifest.p5m b/components/x11/mesa/manifests/sample-manifest.p5m index fba25b8603d..2b2652693e5 100644 --- a/components/x11/mesa/manifests/sample-manifest.p5m +++ b/components/x11/mesa/manifests/sample-manifest.p5m @@ -82,4 +82,6 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv2.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc file path=usr/lib/xorg/modules/dri/$(MACH64/i915_dri.so file path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so +file path=usr/lib/xorg/modules/dri/$(MACH64)/crocus_dri.so +file path=usr/lib/xorg/modules/dri/$(MACH64)/iris_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf diff --git a/components/x11/mesa/mesa.p5m b/components/x11/mesa/mesa.p5m index 3889ceea338..e1a5686f7b4 100644 --- a/components/x11/mesa/mesa.p5m +++ b/components/x11/mesa/mesa.p5m @@ -130,4 +130,6 @@ file path=usr/lib/mesa/$(MACH64)/pkgconfig/glesv2.pc file path=usr/lib/mesa/$(MACH64)/pkgconfig/osmesa.pc file path=usr/lib/xorg/modules/dri/$(MACH64)/i915_dri.so file path=usr/lib/xorg/modules/dri/$(MACH64)/kms_swrast_dri.so +file path=usr/lib/xorg/modules/dri/$(MACH64)/crocus_dri.so +file path=usr/lib/xorg/modules/dri/$(MACH64)/iris_dri.so file path=usr/share/drirc.d/00-mesa-defaults.conf