Merge pull request #8926 from heitbaum/mesa2410

mesa: update to 24.1.0
This commit is contained in:
CvH 2024-06-01 17:18:22 +02:00 committed by GitHub
commit 1ed95502b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 215 additions and 10 deletions

70
licenses/LLVM.txt Normal file
View File

@ -0,0 +1,70 @@
==============================================================================
LLVM Release License
==============================================================================
University of Illinois/NCSA
Open Source License
Copyright (c) 2003-2014 University of Illinois at Urbana-Champaign.
All rights reserved.
Developed by:
LLVM Team
University of Illinois at Urbana-Champaign
http://llvm.org
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
==============================================================================
Copyrights and Licenses for Third Party Software Distributed with LLVM:
==============================================================================
The LLVM software contains code written by third parties. Such software will
have its own individual LICENSE.TXT file in the directory in which it appears.
This file will describe the copyrights, license, and restrictions which apply
to that code.
The disclaimer of warranty in the University of Illinois Open Source License
applies to all code in the LLVM Distribution, and nothing in any of the
other licenses gives permission to use the names of the LLVM Team or the
University of Illinois to endorse or promote products derived from this
Software.
The following pieces of software have additional or alternate copyrights,
licenses, and/or restrictions:
Program Directory
------- ---------
Autoconf llvm/autoconf
llvm/projects/ModuleMaker/autoconf
Google Test llvm/utils/unittest/googletest
OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex}
pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT}
ARM contributions llvm/lib/Target/ARM/LICENSE.TXT
md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h

View File

@ -0,0 +1,29 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2024-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="libclc"
PKG_VERSION="$(get_pkg_version llvm)"
PKG_LICENSE="Apache-2.0"
PKG_URL=""
PKG_DEPENDS_HOST="toolchain:host llvm:host"
PKG_LONGDESC="Low-Level Virtual Machine (LLVM) is a compiler infrastructure."
PKG_DEPENDS_UNPACK+=" llvm"
PKG_PATCH_DIRS+=" $(get_pkg_directory llvm)/patches"
PKG_TOOLCHAIN="cmake"
unpack() {
mkdir -p ${PKG_BUILD}
tar --strip-components=1 -xf ${SOURCES}/llvm/llvm-${PKG_VERSION}.tar.xz -C ${PKG_BUILD}
}
pre_configure() {
PKG_CMAKE_SCRIPT="${PKG_BUILD}/libclc/CMakeLists.txt"
}
pre_configure_host() {
LIBCLC_TARGETS_TO_BUILD="spirv64-mesa3d-"
mkdir -p "${PKG_BUILD}/.${HOST_NAME}"
cd ${PKG_BUILD}/.${HOST_NAME}
PKG_CMAKE_OPTS_HOST="-DLIBCLC_TARGETS_TO_BUILD=${LIBCLC_TARGETS_TO_BUILD}"
}

View File

@ -8,12 +8,13 @@ PKG_SHA256="3bf55363f76c7250946441ab51d3a6cc0ae518055c0ff017324ab76cdefb327a"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://dri.freedesktop.org" PKG_SITE="https://dri.freedesktop.org"
PKG_URL="https://dri.freedesktop.org/libdrm/libdrm-${PKG_VERSION}.tar.xz" PKG_URL="https://dri.freedesktop.org/libdrm/libdrm-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="toolchain:host"
PKG_DEPENDS_TARGET="toolchain libpciaccess" PKG_DEPENDS_TARGET="toolchain libpciaccess"
PKG_LONGDESC="The userspace interface library to kernel DRM services." PKG_LONGDESC="The userspace interface library to kernel DRM services."
get_graphicdrivers get_graphicdrivers
PKG_MESON_OPTS_TARGET="-Dnouveau=disabled \ PKG_MESON_OPTS_COMMON="-Dnouveau=disabled \
-Domap=disabled \ -Domap=disabled \
-Dexynos=disabled \ -Dexynos=disabled \
-Dtegra=disabled \ -Dtegra=disabled \
@ -21,9 +22,23 @@ PKG_MESON_OPTS_TARGET="-Dnouveau=disabled \
-Dman-pages=disabled \ -Dman-pages=disabled \
-Dvalgrind=disabled \ -Dvalgrind=disabled \
-Dfreedreno-kgsl=false \ -Dfreedreno-kgsl=false \
-Dinstall-test-programs=true \
-Dudev=false" -Dudev=false"
PKG_MESON_OPTS_HOST="${PKG_MESON_OPTS_COMMON} \
-Damdgpu=disabled \
-Detnaviv=disabled \
-Dfreedreno=disabled \
-Dintel=disabled \
-Dradeon=disabled \
-Dvc4=disabled \
-Dvmwgfx=disabled \
-Dtests=false \
-Dinstall-test-programs=false"
PKG_MESON_OPTS_TARGET="${PKG_MESON_OPTS_COMMON} \
-Dtests=true \
-Dinstall-test-programs=true"
listcontains "${GRAPHIC_DRIVERS}" "(crocus|i915|iris)" && listcontains "${GRAPHIC_DRIVERS}" "(crocus|i915|iris)" &&
PKG_MESON_OPTS_TARGET+=" -Dintel=enabled" || PKG_MESON_OPTS_TARGET+=" -Dintel=disabled" PKG_MESON_OPTS_TARGET+=" -Dintel=enabled" || PKG_MESON_OPTS_TARGET+=" -Dintel=disabled"

View File

@ -3,11 +3,12 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="mesa" PKG_NAME="mesa"
PKG_VERSION="24.0.8" PKG_VERSION="24.1.0"
PKG_SHA256="d1ed86a266d5b7b8c136ae587ef5618ed1a9837a43440f3713622bf0123bf5c1" PKG_SHA256="b7eac8c79244806b1c276eeeacc329e4a5b31a370804c4b0c7cd16837783f78b"
PKG_LICENSE="OSS" PKG_LICENSE="OSS"
PKG_SITE="http://www.mesa3d.org/" PKG_SITE="http://www.mesa3d.org/"
PKG_URL="https://mesa.freedesktop.org/archive/mesa-${PKG_VERSION}.tar.xz" PKG_URL="https://mesa.freedesktop.org/archive/mesa-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="toolchain:host expat:host libclc:host libdrm:host Mako:host spirv-tools:host"
PKG_DEPENDS_TARGET="toolchain expat libdrm Mako:host" PKG_DEPENDS_TARGET="toolchain expat libdrm Mako:host"
PKG_LONGDESC="Mesa is a 3-D graphics library with an API." PKG_LONGDESC="Mesa is a 3-D graphics library with an API."
@ -17,13 +18,23 @@ if [ "${DEVICE}" = "Dragonboard" ]; then
PKG_DEPENDS_TARGET+=" libarchive libxml2 lua54" PKG_DEPENDS_TARGET+=" libarchive libxml2 lua54"
fi fi
PKG_MESON_OPTS_HOST="-Dglvnd=disabled \
-Dgallium-drivers=iris \
-Dgallium-vdpau=disabled \
-Dplatforms= \
-Ddri3=disabled \
-Dglx=disabled \
-Dvulkan-drivers="
PKG_MESON_OPTS_TARGET="-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \ PKG_MESON_OPTS_TARGET="-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \
-Dgallium-extra-hud=false \ -Dgallium-extra-hud=false \
-Dgallium-rusticl=false \
-Dgallium-omx=disabled \ -Dgallium-omx=disabled \
-Dgallium-nine=false \ -Dgallium-nine=false \
-Dgallium-opencl=disabled \ -Dgallium-opencl=disabled \
-Dshader-cache=enabled \ -Dshader-cache=enabled \
-Dshared-glapi=enabled \ -Dshared-glapi=enabled \
-Dopencl-spirv=false \
-Dopengl=true \ -Dopengl=true \
-Dgbm=enabled \ -Dgbm=enabled \
-Degl=enabled \ -Degl=enabled \
@ -32,6 +43,7 @@ PKG_MESON_OPTS_TARGET="-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \
-Dlmsensors=disabled \ -Dlmsensors=disabled \
-Dbuild-tests=false \ -Dbuild-tests=false \
-Ddraw-use-llvm=false \ -Ddraw-use-llvm=false \
-Dmicrosoft-clc=disabled \
-Dselinux=false \ -Dselinux=false \
-Dosmesa=false" -Dosmesa=false"
@ -52,11 +64,20 @@ else
-Dglx=disabled" -Dglx=disabled"
fi fi
if listcontains "${GRAPHIC_DRIVERS}" "etnaviv"; then
PKG_DEPENDS_TARGET+=" pycparser:host"
fi
if listcontains "${GRAPHIC_DRIVERS}" "iris"; then
PKG_DEPENDS_TARGET+=" mesa:host"
PKG_MESON_OPTS_TARGET+=" -Dintel-clc=system"
fi
if listcontains "${GRAPHIC_DRIVERS}" "(nvidia|nvidia-ng)"; then if listcontains "${GRAPHIC_DRIVERS}" "(nvidia|nvidia-ng)"; then
PKG_DEPENDS_TARGET+=" libglvnd" PKG_DEPENDS_TARGET+=" libglvnd"
PKG_MESON_OPTS_TARGET+=" -Dglvnd=true" PKG_MESON_OPTS_TARGET+=" -Dglvnd=enabled"
else else
PKG_MESON_OPTS_TARGET+=" -Dglvnd=false" PKG_MESON_OPTS_TARGET+=" -Dglvnd=disabled"
fi fi
if [ "${LLVM_SUPPORT}" = "yes" ]; then if [ "${LLVM_SUPPORT}" = "yes" ]; then
@ -99,3 +120,8 @@ if [ "${VULKAN_SUPPORT}" = "yes" ]; then
else else
PKG_MESON_OPTS_TARGET+=" -Dvulkan-drivers=" PKG_MESON_OPTS_TARGET+=" -Dvulkan-drivers="
fi fi
makeinstall_host() {
mkdir -p "${TOOLCHAIN}/bin"
cp -a src/intel/compiler/intel_clc "${TOOLCHAIN}/bin"
}

View File

@ -0,0 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2024-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="spirv-llvm-translator"
PKG_VERSION="18.1.0"
PKG_SHA256="78a770eff24d5ffe2798479845adec4b909cbf058ddc55830ea00fa7d2c1698a"
PKG_LICENSE="LLVM"
PKG_SITE="https://github.com/KhronosGroup/SPIRV-LLVM-Translator"
PKG_URL="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v${PKG_VERSION}.tar.gz"
PKG_LONGDESC="SPIRV-LLVM-Translator"
PKG_TOOLCHAIN="manual"

View File

@ -11,6 +11,13 @@ PKG_SHA256="03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47"
PKG_LICENSE="Apache-2.0" PKG_LICENSE="Apache-2.0"
PKG_SITE="https://github.com/KhronosGroup/SPIRV-Tools" PKG_SITE="https://github.com/KhronosGroup/SPIRV-Tools"
PKG_URL="https://github.com/KhronosGroup/SPIRV-Tools/archive/${PKG_VERSION}.tar.gz" PKG_URL="https://github.com/KhronosGroup/SPIRV-Tools/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="" PKG_DEPENDS_HOST="toolchain:host"
PKG_DEPENDS_UNPACK="spirv-headers"
PKG_LONGDESC="The SPIR-V Tools project provides an API and commands for processing SPIR-V modules." PKG_LONGDESC="The SPIR-V Tools project provides an API and commands for processing SPIR-V modules."
PKG_TOOLCHAIN="manual"
post_unpack() {
mkdir -p ${PKG_BUILD}/external/spirv-headers
tar --strip-components=1 \
-xf "${SOURCES}/spirv-headers/spirv-headers-$(get_pkg_version spirv-headers).tar.gz" \
-C "${PKG_BUILD}/external/spirv-headers"
}

View File

@ -28,9 +28,14 @@ PKG_CMAKE_OPTS_COMMON="-DBUILD_EXTERNAL=ON \
post_unpack() { post_unpack() {
# Enables SPIR-V optimzer capability needed for ENABLE_OPT CMake build option # Enables SPIR-V optimzer capability needed for ENABLE_OPT CMake build option
mkdir -p ${PKG_BUILD}/External/spirv-tools
tar --strip-components=1 \
-xf "${SOURCES}/spirv-tools/spirv-tools-$(get_pkg_version spirv-tools).tar.gz" \
-C "${PKG_BUILD}/External/spirv-tools"
mkdir -p ${PKG_BUILD}/External/spirv-tools/external/spirv-headers mkdir -p ${PKG_BUILD}/External/spirv-tools/external/spirv-headers
cp -R $(get_build_dir spirv-tools)/* ${PKG_BUILD}/External/spirv-tools tar --strip-components=1 \
cp -R $(get_build_dir spirv-headers)/* ${PKG_BUILD}/External/spirv-tools/external/spirv-headers -xf "${SOURCES}/spirv-headers/spirv-headers-$(get_pkg_version spirv-headers).tar.gz" \
-C "${PKG_BUILD}/External/spirv-tools/external/spirv-headers"
} }
pre_configure_host() { pre_configure_host() {

View File

@ -13,6 +13,10 @@ PKG_DEPENDS_TARGET="toolchain llvm:host zlib"
PKG_LONGDESC="Low-Level Virtual Machine (LLVM) is a compiler infrastructure." PKG_LONGDESC="Low-Level Virtual Machine (LLVM) is a compiler infrastructure."
PKG_TOOLCHAIN="cmake" PKG_TOOLCHAIN="cmake"
if listcontains "${GRAPHIC_DRIVERS}" "iris"; then
PKG_DEPENDS_UNPACK="spirv-headers spirv-llvm-translator"
fi
PKG_CMAKE_OPTS_COMMON="-DLLVM_INCLUDE_TOOLS=ON \ PKG_CMAKE_OPTS_COMMON="-DLLVM_INCLUDE_TOOLS=ON \
-DLLVM_BUILD_TOOLS=OFF \ -DLLVM_BUILD_TOOLS=OFF \
-DLLVM_BUILD_UTILS=OFF \ -DLLVM_BUILD_UTILS=OFF \
@ -41,8 +45,21 @@ PKG_CMAKE_OPTS_COMMON="-DLLVM_INCLUDE_TOOLS=ON \
-DLLVM_ENABLE_RTTI=ON \ -DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_UNWIND_TABLES=OFF \ -DLLVM_ENABLE_UNWIND_TABLES=OFF \
-DLLVM_ENABLE_Z3_SOLVER=OFF \ -DLLVM_ENABLE_Z3_SOLVER=OFF \
-DLLVM_SPIRV_INCLUDE_TESTS=OFF \
-DCMAKE_SKIP_RPATH=ON" -DCMAKE_SKIP_RPATH=ON"
post_unpack() {
if listcontains "${GRAPHIC_DRIVERS}" "iris"; then
mkdir -p "${PKG_BUILD}"/llvm/projects/{SPIRV-Headers,SPIRV-LLVM-Translator}
tar --strip-components=1 \
-xf "${SOURCES}/spirv-headers/spirv-headers-$(get_pkg_version spirv-headers).tar.gz" \
-C "${PKG_BUILD}/llvm/projects/SPIRV-Headers"
tar --strip-components=1 \
-xf "${SOURCES}/spirv-llvm-translator/spirv-llvm-translator-$(get_pkg_version spirv-llvm-translator).tar.gz" \
-C "${PKG_BUILD}/llvm/projects/SPIRV-LLVM-Translator"
fi
}
pre_configure() { pre_configure() {
PKG_CMAKE_SCRIPT=${PKG_BUILD}/llvm/CMakeLists.txt PKG_CMAKE_SCRIPT=${PKG_BUILD}/llvm/CMakeLists.txt
} }
@ -84,12 +101,20 @@ pre_configure_host() {
post_make_host() { post_make_host() {
ninja ${NINJA_OPTS} llvm-config llvm-tblgen ninja ${NINJA_OPTS} llvm-config llvm-tblgen
if listcontains "${GRAPHIC_DRIVERS}" "iris"; then
ninja ${NINJA_OPTS} llvm-as llvm-link llvm-spirv opt
fi
} }
post_makeinstall_host() { post_makeinstall_host() {
mkdir -p ${TOOLCHAIN}/bin mkdir -p ${TOOLCHAIN}/bin
cp -a bin/llvm-config ${TOOLCHAIN}/bin cp -a bin/llvm-config ${TOOLCHAIN}/bin
cp -a bin/llvm-tblgen ${TOOLCHAIN}/bin cp -a bin/llvm-tblgen ${TOOLCHAIN}/bin
if listcontains "${GRAPHIC_DRIVERS}" "iris"; then
cp -a bin/{llvm-as,llvm-link,llvm-spirv,opt} "${TOOLCHAIN}/bin"
fi
} }
pre_configure_target() { pre_configure_target() {

View File

@ -0,0 +1,17 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2024-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="pycparser"
PKG_VERSION="2.22"
PKG_SHA256="491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"
PKG_LICENSE="BSD-3-Clause"
PKG_SITE="https://pypi.org/project/pycparser/"
PKG_URL="https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="Python3:host setuptools:host"
PKG_LONGDESC="Complete C99 parser in pure Python"
PKG_TOOLCHAIN="manual"
makeinstall_host() {
export DONT_BUILD_LEGACY_PYC=1
exec_thread_safe python3 setup.py install --prefix="${TOOLCHAIN}"
}