summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkevall4742020-11-21 20:59:19 -0500
committerkevall4742020-11-21 20:59:19 -0500
commit96d3128307e1460648bd8b71f8b92e44cb9a93ce (patch)
tree82ac776f1e49b1b957aaae7d7607953b6f3d75eb
downloadaur-96d3128307e1460648bd8b71f8b92e44cb9a93ce.tar.gz
first push
-rw-r--r--.SRCINFO95
-rw-r--r--0001-ENABLE-LLVM-BY-DEFAULT.patch58
-rw-r--r--0001-util-workaround-LTO-compilation-break-since-18cb8f23.patch27
-rw-r--r--0003-evergreen-big-endian.patch26
-rw-r--r--LICENSE90
-rw-r--r--PKGBUILD150
6 files changed, 446 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..950cb5b5e5db
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,95 @@
+pkgbase = lib32-mesa-llvm
+ pkgdesc = Mesa stable release. LLVM enable by default. More options are enable than the standard mesa package. (32-bit)
+ pkgver = 20.3.0_rc2
+ pkgrel = 1
+ url = https://mesa3d.org/
+ arch = x86_64
+ license = MIT
+ makedepends = bison
+ makedepends = lib32-flex
+ makedepends = valgrind
+ makedepends = meson
+ makedepends = ninja
+ makedepends = git
+ makedepends = ninjas2
+ makedepends = lib32-clang
+ makedepends = lib32-libxvmc
+ makedepends = python
+ makedepends = python-appdirs
+ makedepends = python-mako
+ makedepends = python-evdev
+ makedepends = lib32-elfutils
+ makedepends = glslang
+ makedepends = lib32-libva
+ makedepends = lib32-libepoxy
+ makedepends = lib32-libxv
+ makedepends = lib32-libvdpau
+ makedepends = lib32-libx11
+ makedepends = lib32-libxml2
+ makedepends = lib32-libxrandr
+ makedepends = lib32-llvm
+ makedepends = libconfig
+ makedepends = lib32-gtk3
+ makedepends = wayland-protocols
+ makedepends = xorgproto
+ depends = lib32-libdrm
+ depends = lib32-libelf
+ depends = lib32-libglvnd
+ depends = libomxil-bellagio
+ depends = lib32-libunwind
+ depends = lib32-libxdamage
+ depends = lib32-libxxf86vm
+ depends = lib32-llvm-libs
+ depends = lib32-lm_sensors
+ depends = lib32-wayland
+ depends = lib32-zstd
+ depends = lib32-libxshmfence
+ depends = libclc
+ depends = lib32-expat
+ depends = lib32-vulkan-icd-loader
+ provides = lib32-mesa
+ provides = lib32-opencl-mesa
+ provides = lib32-vulkan-intel
+ provides = lib32-vulkan-radeon
+ provides = lib32-vulkan-driver
+ provides = lib32-vulkan-mesa-layer
+ provides = lib32-libva-mesa-driver
+ provides = lib32-mesa-vdpau
+ provides = lib32-opengl-driver
+ provides = lib32-opencl-driver
+ provides = lib32-mesa-libgl
+ conflicts = lib32-mesa
+ conflicts = lib32-opencl-mesa
+ conflicts = lib32-vulkan-intel
+ conflicts = lib32-vulkan-radeon
+ conflicts = lib32-vulkan-mesa-layer
+ conflicts = lib32-libva-mesa-driver
+ conflicts = lib32-mesa-vdpau
+ conflicts = lib32-mesa-aco-rc
+ conflicts = lib32-mesa-aco
+ conflicts = lib32-mesa-llvm
+ conflicts = lib32-mesa-git
+ replaces = lib32-mesa
+ replaces = lib32-opencl-mesa
+ replaces = lib32-vulkan-intel
+ replaces = lib32-vulkan-radeon
+ replaces = lib32-vulkan-mesa-layer
+ replaces = lib32-libva-mesa-driver
+ replaces = lib32-mesa-vdpau
+ replaces = lib32-mesa-aco-rc
+ replaces = lib32-mesa-aco
+ replaces = lib32-mesa-llvm
+ replaces = lib32-mesa-git
+ source = https://archive.mesa3d.org/mesa-20.3.0-rc2.tar.xz
+ source = 0001-util-workaround-LTO-compilation-break-since-18cb8f23.patch
+ source = 0001-ENABLE-LLVM-BY-DEFAULT.patch
+ source = 0003-evergreen-big-endian.patch
+ source = LICENSE
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = lib32-mesa-llvm
+
diff --git a/0001-ENABLE-LLVM-BY-DEFAULT.patch b/0001-ENABLE-LLVM-BY-DEFAULT.patch
new file mode 100644
index 000000000000..05154cb68067
--- /dev/null
+++ b/0001-ENABLE-LLVM-BY-DEFAULT.patch
@@ -0,0 +1,58 @@
+From ac258391261e9c7ce26b0542599009b443255f05 Mon Sep 17 00:00:00 2001
+From: kevall474 <kevall474@tuta.io>
+Date: Sat, 21 Nov 2020 12:41:12 -0500
+Subject: [PATCH] ENABLE LLVM BY DEFAULT
+
+---
+ src/amd/vulkan/radv_debug.h | 3 ++-
+ src/amd/vulkan/radv_device.c | 5 ++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h
+index 9e74df77f40..2c0d39c33ca 100644
+--- a/src/amd/vulkan/radv_debug.h
++++ b/src/amd/vulkan/radv_debug.h
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * Copyright © 2017 Google.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+@@ -67,6 +67,7 @@ enum {
+ RADV_PERFTEST_PS_WAVE_32 = 1 << 5,
+ RADV_PERFTEST_GE_WAVE_32 = 1 << 6,
+ RADV_PERFTEST_DFSM = 1 << 7,
++ RADV_PERFTEST_ACO = 1 << 8,
+ };
+
+ bool
+diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
+index f9a58a73dab..c4547b22f52 100644
+--- a/src/amd/vulkan/radv_device.c
++++ b/src/amd/vulkan/radv_device.c
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * Copyright © 2016 Red Hat.
+ * Copyright © 2016 Bas Nieuwenhuizen
+ *
+@@ -532,6 +532,7 @@ static const struct debug_control radv_perftest_options[] = {
+ {"pswave32", RADV_PERFTEST_PS_WAVE_32},
+ {"gewave32", RADV_PERFTEST_GE_WAVE_32},
+ {"dfsm", RADV_PERFTEST_DFSM},
++ {"aco", RADV_PERFTEST_ACO},
+ {NULL, 0}
+ };
+
+@@ -665,6 +666,8 @@ VkResult radv_CreateInstance(
+ instance->debug_flags = parse_debug_string(getenv("RADV_DEBUG"),
+ radv_debug_options);
+
++ instance->debug_flags |= RADV_DEBUG_LLVM;
++
+ const char *radv_perftest_str = getenv("RADV_PERFTEST");
+ instance->perftest_flags = parse_debug_string(radv_perftest_str,
+ radv_perftest_options);
+--
+2.29.2.windows.2
+
diff --git a/0001-util-workaround-LTO-compilation-break-since-18cb8f23.patch b/0001-util-workaround-LTO-compilation-break-since-18cb8f23.patch
new file mode 100644
index 000000000000..7bccc532b088
--- /dev/null
+++ b/0001-util-workaround-LTO-compilation-break-since-18cb8f23.patch
@@ -0,0 +1,27 @@
+From ddb159f7b8ead04b8ebfda0796bea8e9c6aee788 Mon Sep 17 00:00:00 2001
+From: Thomas Crider <gloriouseggroll@gmail.com>
+Date: Thu, 16 Jul 2020 21:43:19 -0600
+Subject: [PATCH] util: workaround LTO compilation break since 18cb8f23
+To: wine-devel <wine-devel@winehq.org>
+
+Signed-off-by: Thomas Crider <gloriouseggroll@gmail.com>
+---
+ src/util/format/u_format.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/format/u_format.h b/src/util/format/u_format.h
+index 4b182ff558d..1d7e50d5bc9 100644
+--- a/src/util/format/u_format.h
++++ b/src/util/format/u_format.h
+@@ -406,7 +406,7 @@ struct util_format_description
+
+
+ const struct util_format_description *
+-util_format_description(enum pipe_format format) ATTRIBUTE_CONST;
++util_format_description(enum pipe_format format);
+
+
+ /*
+--
+2.26.2
+
diff --git a/0003-evergreen-big-endian.patch b/0003-evergreen-big-endian.patch
new file mode 100644
index 000000000000..ccf1717c7153
--- /dev/null
+++ b/0003-evergreen-big-endian.patch
@@ -0,0 +1,26 @@
+From 0ec3bdb2264b491fd3f5dc4e638b4c12611ef219 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+Date: Sun, 20 Mar 2016 13:27:45 +0100
+Subject: [PATCH 3/4] evergreen big endian
+
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+---
+ src/gallium/drivers/r600/r600_state_common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
+index cac240e..4b620a1 100644
+--- a/src/gallium/drivers/r600/r600_state_common.c
++++ b/src/gallium/drivers/r600/r600_state_common.c
+@@ -2716,7 +2716,7 @@ uint32_t r600_translate_colorformat(enum chip_class chip, enum pipe_format forma
+
+ uint32_t r600_colorformat_endian_swap(uint32_t colorformat, bool do_endian_swap)
+ {
+- if (R600_BIG_ENDIAN) {
++ if (0 && R600_BIG_ENDIAN) {
+ switch(colorformat) {
+ /* 8-bit buffers. */
+ case V_0280A0_COLOR_4_4:
+--
+2.7.4
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..0ed1c8cd079f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,90 @@
+License and Copyright
+=====================
+
+Disclaimer
+----------
+
+Mesa is a 3-D graphics library with an API which is very similar to that
+of `OpenGL <https://www.opengl.org/>`_ [1]_.
+To the extent that Mesa utilizes the OpenGL command syntax or state
+machine, it is being used with authorization from `Silicon Graphics,
+Inc. <https://www.sgi.com/>`__\ (SGI). However, the author does not
+possess an OpenGL license from SGI, and makes no claim that Mesa is in
+any way a compatible replacement for OpenGL or associated with SGI.
+Those who want a licensed implementation of OpenGL should contact a
+licensed vendor.
+
+Please do not refer to the library as *MesaGL* (for legal reasons). It's
+just *Mesa* or *The Mesa 3-D graphics library*.
+
+.. [1] OpenGL is a trademark of `Silicon Graphics
+ Incorporated <https://www.sgi.com/>`__.
+
+License / Copyright Information
+-------------------------------
+
+The Mesa distribution consists of several components. Different
+copyrights and licenses apply to different components. For example, the
+GLX client code uses the SGI Free Software License B, and some of the
+Mesa device drivers are copyrighted by their authors. See below for a
+list of Mesa's main components and the license for each.
+
+The core Mesa library is licensed according to the terms of the MIT
+license. This allows integration with the XFree86, Xorg and DRI
+projects.
+
+The default Mesa license is as follows:
+
+::
+
+ Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in 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:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ 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 AUTHORS 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 IN THE
+ SOFTWARE.
+
+Attention, Contributors
+-----------------------
+
+When contributing to the Mesa project you must agree to the licensing
+terms of the component to which you're contributing. The following
+section lists the primary components of the Mesa distribution and their
+respective licenses.
+
+Mesa Component Licenses
+-----------------------
+
++-----------------+------------------------+-----------------------------+
+| Component | Location | License |
++=================+========================+=============================+
+| Main Mesa code | src/mesa/ | MIT |
++-----------------+------------------------+-----------------------------+
+| Device drivers | src/mesa/drivers/* | MIT, generally |
++-----------------+------------------------+-----------------------------+
+| Gallium code | src/gallium/ | MIT |
++-----------------+------------------------+-----------------------------+
+| Ext headers | include/GL/glext.h, | Khronos |
+| | include/GL/glxext.h | |
++-----------------+------------------------+-----------------------------+
+| GLX client code | src/glx/ | SGI Free Software License B |
++-----------------+------------------------+-----------------------------+
+| C11 thread | include/c11/threads*.h | Boost (permissive) |
+| emulation | | |
++-----------------+------------------------+-----------------------------+
+
+In general, consult the source files for license terms.
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e4b929bedfb5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,150 @@
+#Maintainer: kevall474 <kevall474@tuta.io> <https://github.com/kevall474>
+#Credits: Lone_Wolf <lone_wolf@klaas-de-kat.nl> ---> For the base PKGBULD
+#Credits: Laurent Carlier <lordheavym@gmail.com> ---> For the base PKGBUILD
+
+pkgname=lib32-mesa-llvm
+pkgver=20.3.0_rc2
+pkgrel=1
+versiontag=20.3.0-rc2
+pkgdesc="Mesa stable release. LLVM enable by default. More options are enable than the standard mesa package. (32-bit)"
+arch=(x86_64)
+url="https://mesa3d.org/"
+license=('MIT')
+depends=("lib32-libdrm" "lib32-libelf" "lib32-libglvnd" "libomxil-bellagio" "lib32-libunwind" "lib32-libxdamage" "lib32-libxxf86vm" "lib32-llvm-libs"
+ "lib32-lm_sensors" "lib32-wayland" "lib32-zstd" "lib32-libxshmfence" "libclc" "lib32-expat" "lib32-vulkan-icd-loader")
+makedepends=("bison" "lib32-flex" "valgrind" "meson" "ninja" "git" "ninjas2" "lib32-clang" "lib32-libxvmc" "python" "python-appdirs" "python-mako" "python-evdev"
+ "lib32-elfutils" "glslang" "lib32-libva" "lib32-libepoxy" "lib32-libxv" "lib32-libvdpau" "lib32-libx11" "lib32-libxml2" "lib32-libxrandr" "lib32-llvm"
+ "libconfig" "lib32-gtk3" "wayland-protocols" "xorgproto")
+conflicts=("lib32-mesa" "lib32-opencl-mesa" "lib32-vulkan-intel" "lib32-vulkan-radeon" "lib32-vulkan-mesa-layer" "lib32-libva-mesa-driver" "lib32-mesa-vdpau"
+ "lib32-mesa-aco-rc" "lib32-mesa-aco" "lib32-mesa-llvm" "lib32-mesa-git")
+replaces=("lib32-mesa" "lib32-opencl-mesa" "lib32-vulkan-intel" "lib32-vulkan-radeon" "lib32-vulkan-mesa-layer" "lib32-libva-mesa-driver" "lib32-mesa-vdpau"
+ "lib32-mesa-aco-rc" "lib32-mesa-aco" "lib32-mesa-llvm" "lib32-mesa-git")
+provides=("lib32-mesa" "lib32-opencl-mesa" "lib32-vulkan-intel" "lib32-vulkan-radeon" "lib32-vulkan-driver" "lib32-vulkan-mesa-layer" "lib32-libva-mesa-driver"
+ "lib32-mesa-vdpau" "lib32-opengl-driver" "lib32-opencl-driver" "lib32-mesa-libgl")
+source=("https://archive.mesa3d.org/mesa-${versiontag}.tar.xz"
+ "0001-util-workaround-LTO-compilation-break-since-18cb8f23.patch"
+ "0001-ENABLE-LLVM-BY-DEFAULT.patch"
+ "0003-evergreen-big-endian.patch"
+ "LICENSE")
+md5sums=("SKIP"
+ "SKIP"
+ "SKIP"
+ "SKIP"
+ "SKIP")
+
+prepare(){
+ cd mesa-${versiontag}
+
+ # Apply any patch
+ local src
+ for src in "${source[@]}"; do
+ src="${src%%::*}"
+ src="${src##*/}"
+ [[ $src = *.patch ]] || continue
+ msg2 "Applying patch $src..."
+ patch -Np1 < "../$src"
+ done
+}
+
+build(){
+export CC="gcc -m32"
+export CXX="g++ -m32"
+export PKG_CONFIG="i686-pc-linux-gnu-pkg-config"
+cat >crossfile.ini <<END
+[binaries]
+llvm-config = '/usr/bin/llvm-config32'
+END
+
+ cd mesa-${versiontag}
+
+ # remove build dir if there is one
+ msg2 "remove build dir if there is one"
+ if dir build; then
+ rm -rf build
+ fi
+
+ # create build dir
+ msg2 "Create build dir"
+ mkdir -p -v build
+
+ # build with meson
+ msg2 "Build with meson"
+ meson build \
+ --native-file ../crossfile.ini \
+ --libdir=/usr/lib32 \
+ -D b_ndebug=true \
+ -D b_lto=true \
+ -D buildtype=plain \
+ --wrap-mode=nofallback \
+ -D sysconfdir=/etc \
+ -Dprefix=/usr \
+ -Dplatforms=x11,wayland \
+ -Ddri3=enabled \
+ -Ddri-drviers=i915,i965,r100,r200,nouveau \
+ -Dgallium-drivers=r300,r600,radeonsi,nouveau,virgl,svga,swrast,iris,zink,freedreno,v3d,vc4,etnaviv,tegra,kmsro \
+ -Dgallium-extra-hud=true \
+ -Dgallium-vdpau=enabled \
+ -Dgallium-xvmc=enabled \
+ -Dgallium-omx=auto \
+ -Dgallium-va=enabled \
+ -Dgallium-xa=enabled \
+ -Dgallium-nine=true \
+ -Dgallium-opencl=icd \
+ -Dopencl-spirv=false \
+ -Dvulkan-drivers=amd,intel \
+ -Dshader-cache=enabled \
+ -Dvulkan-overlay-layer=true \
+ -Dvulkan-device-select-layer=true \
+ -Dshared-glapi=enabled \
+ -Dgles1=enabled \
+ -Dgles2=enabled \
+ -Dopengl=true \
+ -Dgbm=enabled \
+ -Dglx=dri \
+ -Degl=enabled \
+ -Dglvnd=true \
+ -Dllvm=enabled \
+ -Dshared-llvm=disabled \
+ -Dvalgrind=disabled \
+ -Dlibunwind=enabled \
+ -Dlmsensors=enabled \
+ -Dselinux=false \
+ -Dosmesa=gallium \
+ -Dswr-arches=avx,avx2,knl,skx \
+ -Dshared-swr=true \
+ -Dpower8=enabled \
+ -Dxlib-lease=enabled \
+ -Dglx-direct=true \
+ -Dzstd=enabled
+}
+
+package(){
+ # compiling mesa and installing to "$pkgdir"
+ msg2 "Compiling mesa and installing to ${pkgdir}"
+ DESTDIR="${pkgdir}" ninja $NINJAFLAGS -C mesa-${versiontag}/build/ install
+
+ #Remove files provided by standard mesa build
+ msg2 "Remove files provided by standard mesa build"
+ rm -rf "$pkgdir"/etc
+ rm -rf "$pkgdir"/usr/include
+ rm -rf "$pkgdir"/usr/share/glvnd
+ rm -rf "$pkgdir"/usr/share/drirc.d
+ rm -rf "$pkgdir"/usr/share/freedreno
+ rm -rf "$pkgdir"/usr/share/vulkan/explicit_layer.d
+ rm -rf "$pkgdir"/usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json
+ rm -rf "$pkgdir"/usr/share/vulkan/implicit_layer.d
+ rm -rf "$pkgdir"/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json
+
+ # remove script file from /usr/bin
+ msg2 "Remove ${pkgdir}/usr/bin/mesa-overlay-control.py"
+ rm "${pkgdir}/usr/bin/mesa-overlay-control.py"
+ msg2 "Remove ${pkgdir}/usr/bin"
+ rm -rf "${pkgdir}/usr/bin"
+
+ # indirect rendering
+ ln -s /usr/lib32/libGLX_mesa.so.0 "${pkgdir}/usr/lib32/libGLX_indirect.so.0"
+
+ # installing license
+ install -dm755 "${pkgdir}"/usr/share/licenses/${pkgname}-${versiontag}/
+ cp -v -r "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}-${versiontag}/
+}