From fb789cce5d175bb92d1b3f76c871b5084ab94f8b Mon Sep 17 00:00:00 2001 From: K D Hedger Date: Mon, 9 Nov 2020 10:13:48 +0000 Subject: [PATCH] updated mesalib for rpi4 --- .../0001-Rip-out-VC4-forced-NEON.patch | 45 +++++++++++++++++++ .../xorg/MesaLib/MesaLib.LFSBuild | 43 +++++++++++++++--- 2 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 LFSPkgBuildScripts/xorg/MesaLib/0001-Rip-out-VC4-forced-NEON.patch diff --git a/LFSPkgBuildScripts/xorg/MesaLib/0001-Rip-out-VC4-forced-NEON.patch b/LFSPkgBuildScripts/xorg/MesaLib/0001-Rip-out-VC4-forced-NEON.patch new file mode 100644 index 00000000..37a30f1f --- /dev/null +++ b/LFSPkgBuildScripts/xorg/MesaLib/0001-Rip-out-VC4-forced-NEON.patch @@ -0,0 +1,45 @@ +From b7b9cf45bf8fb3514c1f71b3b5186474069e2575 Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Mon, 4 Feb 2019 17:54:45 -0700 +Subject: [PATCH] Rip out VC4 forced NEON + +Breaks with distro-supplied CFLAGS. +--- + meson.build | 1 - + src/gallium/drivers/vc4/meson.build | 11 ----------- + 2 files changed, 12 deletions(-) + +diff --git a/meson.build b/meson.build +index 4afd8ca663b..317bf079dbd 100644 +--- a/meson.build ++++ b/meson.build +@@ -1009,7 +1009,6 @@ elif host_machine.cpu_family() == 'x86_64' + elif host_machine.cpu_family() == 'arm' + if system_has_kms_drm + with_asm_arch = 'arm' +- pre_args += ['-DUSE_ARM_ASM'] + endif + elif host_machine.cpu_family() == 'aarch64' + if system_has_kms_drm +diff --git a/src/gallium/drivers/vc4/meson.build b/src/gallium/drivers/vc4/meson.build +index 5ce5af5f6b4..9a4197c37b2 100644 +--- a/src/gallium/drivers/vc4/meson.build ++++ b/src/gallium/drivers/vc4/meson.build +@@ -84,17 +84,6 @@ files_libvc4 = files( + vc4_c_args = [] + + libvc4_neon = [] +-if host_machine.cpu_family() == 'arm' +- libvc4_neon = static_library( +- 'vc4_neon', +- 'vc4_tiling_lt_neon.c', +- include_directories : [ +- inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom +- ], +- c_args : '-mfpu=neon', +- ) +- vc4_c_args += '-DUSE_ARM_ASM' +-endif + + if dep_simpenrose.found() + vc4_c_args += '-DUSE_VC4_SIMULATOR' diff --git a/LFSPkgBuildScripts/xorg/MesaLib/MesaLib.LFSBuild b/LFSPkgBuildScripts/xorg/MesaLib/MesaLib.LFSBuild index 957bc6f5..7ef36e59 100755 --- a/LFSPkgBuildScripts/xorg/MesaLib/MesaLib.LFSBuild +++ b/LFSPkgBuildScripts/xorg/MesaLib/MesaLib.LFSBuild @@ -7,9 +7,9 @@ if ! lfspkg -B "$DEPENDS";then exit 100 fi -PKGNAME="mesalib" +PKGNAME="MesaLib" TARNAME="mesa" -VERSION="20.0.7" +VERSION="20.1.10" BUILD=${BUILD:-1} SECTION="XORG" SUFFIX="LFSPKG" @@ -20,19 +20,48 @@ CWD=$(pwd) scriptLog "${PKGNAME}-${VERSION}" gettar "https://mesa.freedesktop.org/archive/${TARBALL}" $SECTION +gettar "http://www.linuxfromscratch.org/patches/blfs/10.0/mesa-20.1.5-add_xdemos-1.patch" $SECTION rm -rf "$PKG" || true mkdir -p "$PKG" pushd $COMPILEAT 2>/dev/null||true extractarchive "${SOURCEARCHIVES}/${SECTION}/${TARBALL}" pushd "${TARNAME}-${VERSION}" + patch -p1 -i ${CWD}/0001-Rip-out-VC4-forced-NEON.patch + patch -Np1 -i "${SOURCEARCHIVES}/${SECTION}/mesa-20.1.5-add_xdemos-1.patch" + GALLIUM="r300,r600,radeonsi,freedreno,nouveau,swrast,virgl,zink,etnaviv,kmsro,lima,panfrost,tegra,v3d,vc4" + MESON_OPT="-D asm=false" + rm -rf build||true mkdir build||true if [[ $PIBUILD -eq 1 ]];then cd build - DRI_DRIVERS= - GALLIUM_DRV="vc4,v3d,kmsro" + DRI_DRIVERS="r100,r200,nouveau" + GALLIUM_DRV="vc4,v3d,kmsro,swrast" PLATFORMS="x11,surfaceless,drm" - meson --prefix=/usr -Dglx=disabled -Dbuildtype=release -Ddri-drivers=$DRI_DRIVERS -Dgallium-drivers=$GALLIUM_DRV -Dgallium-nine=false -Dvalgrind=false -Dplatforms=$PLATFORMS -Dopengl=true -Dgles2=true -Dgles1=true -Dgbm=true -Dglx-direct=true -Dllvm=true .. + meson --prefix=/usr \ + -Dbuildtype=release \ + -Ddri-drivers=$DRI_DRIVERS \ + -Dgallium-drivers=$GALLIUM_DRV \ + -Dgallium-nine=false \ + -Dvalgrind=false \ + -Dplatforms=$PLATFORMS \ + -Dopengl=true \ + -Dgles2=true \ + -Dgles1=true \ + -Dgbm=true \ + -Dglx-direct=true \ + -Dllvm=true \ + -Degl=true \ + -Dglx=dri \ + -Dvulkan-drivers="auto" \ + -Ddri3=true \ + -Dgallium-extra-hud=true \ + -Dgallium-xa=false \ + -Dgallium-xvmc=false \ + -Dlibunwind=false \ + -Dosmesa=gallium \ + -Dshared-glapi=true \ + $MESON_OPT .. else cd build DRI_DRIVERS="i965,nouveau" @@ -41,7 +70,7 @@ pushd $COMPILEAT 2>/dev/null||true meson --prefix=$XORG_PREFIX -Dbuildtype=release -Ddri-drivers=$DRI_DRIVERS -Dgallium-drivers=$GALLIUM_DRV -Dgallium-nine=false -Dglx=dri -Dosmesa=gallium -Dvalgrind=false -Dplatforms=$PLATFORMS .. fi - ninja $MAKEFLAGS||ninja -j1||exit 100 + ninja -j3||ninja -j1||exit 100 DESTDIR=$PKG ninja install||exit 100 install -v -dm755 $PKG/usr/share/doc/${TARNAME}-${VERSION} cp -rfv ../docs/* $PKG/usr/share/doc/${TARNAME}-${VERSION} @@ -73,3 +102,5 @@ pushd $COMPILEAT 2>/dev/null||true rm -r "$PKG" "${TARNAME}-${VERSION}" popd 2>/dev/null||true + +