summaryrefslogtreecommitdiff
path: root/source/x
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2021-03-12 01:46:50 +0000
committerEric Hameleers <alien@slackware.com>2021-03-12 08:59:52 +0100
commit913fae06e0ae428cf46ebd3dc23dbf384d42b20b (patch)
treeea77a46af93fc6eeac344801aefc8269ce672797 /source/x
parente2d188d741d8d635b1822a3a50defa64b00657da (diff)
downloadcurrent-913fae06e0ae428cf46ebd3dc23dbf384d42b20b.tar.gz
Fri Mar 12 01:46:50 UTC 202120210312014650
x/mesa-21.0.0-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/x')
-rwxr-xr-xsource/x/mesa/mesa.SlackBuild11
-rw-r--r--source/x/mesa/patches-revert/72566fd92c27b39abe2057f6f23388ec40793dd9.patch42
-rw-r--r--source/x/mesa/patches-revert/80817b6e344258ac9b955f824ebf9019a0fc1610.patch35
-rw-r--r--source/x/mesa/patches/MESA_VK_DEVICE_SELECT.uint32_t.patch78
4 files changed, 86 insertions, 80 deletions
diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild
index 82cb083a..85e266e8 100755
--- a/source/x/mesa/mesa.SlackBuild
+++ b/source/x/mesa/mesa.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=mesa
VERSION=${VERSION:-$(echo $PKGNAM-[0-9]*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
DEMOVERS=${DEMOVERS:-8.4.0}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
BUILD_DEMOS=${BUILD_DEMOS:-YES}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -101,6 +101,13 @@ if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
done
fi
+# Revert these patches from git (and maybe elsewhere):
+if /bin/ls $CWD/patches-revert/*.patch 1> /dev/null 2> /dev/null ; then
+ for patch in $CWD/patches-revert/*.patch ; do
+ patch -p1 -R --verbose < $patch || exit 1 ;
+ done
+fi
+
# Configure, build, and install:
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
@@ -121,7 +128,7 @@ meson setup \
-Dplatforms=x11,wayland \
-Dgallium-opencl=icd \
-Dgallium-nine=true \
- -Dosmesa=gallium \
+ -Dosmesa=true \
-Ddri-drivers=$DRI_DRIVERS \
-Dgallium-drivers=$GALLIUM_DRIVERS \
-Dvulkan-device-select-layer=true \
diff --git a/source/x/mesa/patches-revert/72566fd92c27b39abe2057f6f23388ec40793dd9.patch b/source/x/mesa/patches-revert/72566fd92c27b39abe2057f6f23388ec40793dd9.patch
new file mode 100644
index 00000000..0200efa3
--- /dev/null
+++ b/source/x/mesa/patches-revert/72566fd92c27b39abe2057f6f23388ec40793dd9.patch
@@ -0,0 +1,42 @@
+From 72566fd92c27b39abe2057f6f23388ec40793dd9 Mon Sep 17 00:00:00 2001
+From: Jesse Natalie <jenatali@microsoft.com>
+Date: Wed, 18 Nov 2020 18:28:49 -0800
+Subject: [PATCH] clover: Support LLVM coming from CMake instead of config-tool
+
+Reviewed-by: Karol Herbst <kherbst@redhat.com>
+Reviewed-by: Francisco Jerez <currojerez@riseup.net>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
+---
+ src/gallium/frontends/clover/meson.build | 2 +-
+ src/gallium/targets/opencl/meson.build | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build
+index 95a100d005c..b946eefff37 100644
+--- a/src/gallium/frontends/clover/meson.build
++++ b/src/gallium/frontends/clover/meson.build
+@@ -71,7 +71,7 @@ libclllvm = static_library(
+ clover_opencl_cpp_args,
+ clover_spirv_cpp_args,
+ '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(
+- dep_llvm.get_configtool_variable('libdir'), 'clang',
++ dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang',
+ dep_llvm.version(), 'include',
+ )),
+ ],
+diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
+index dedd8ab7647..e758e4c12d9 100644
+--- a/src/gallium/targets/opencl/meson.build
++++ b/src/gallium/targets/opencl/meson.build
+@@ -29,7 +29,7 @@ if with_ld_version_script
+ opencl_link_deps += files('opencl.sym')
+ endif
+
+-llvm_libdir = dep_llvm.get_configtool_variable('libdir')
++llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
+ opencl_libname = with_opencl_icd ? 'MesaOpenCL' : 'OpenCL'
+
+ polly_dep = null_dep
+--
+GitLab
+
diff --git a/source/x/mesa/patches-revert/80817b6e344258ac9b955f824ebf9019a0fc1610.patch b/source/x/mesa/patches-revert/80817b6e344258ac9b955f824ebf9019a0fc1610.patch
new file mode 100644
index 00000000..13eec39c
--- /dev/null
+++ b/source/x/mesa/patches-revert/80817b6e344258ac9b955f824ebf9019a0fc1610.patch
@@ -0,0 +1,35 @@
+From 80817b6e344258ac9b955f824ebf9019a0fc1610 Mon Sep 17 00:00:00 2001
+From: Jesse Natalie <jenatali@microsoft.com>
+Date: Wed, 18 Nov 2020 18:30:30 -0800
+Subject: [PATCH] meson: Adjust Clover's required LLVM modules
+
+When coming from CMake, all-targets doesn't exist, and Clover's
+mechanism for finding Clang apparently requires the OpenMP frontend
+lib but doesn't automatically pull it in.
+
+Reviewed-by: Daniel Stone <daniels@collabora.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
+---
+ meson.build | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 6d1607c35a3..f828eb80faa 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1479,9 +1479,10 @@ if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
+ endif
+ if with_gallium_opencl
+ llvm_modules += [
+- 'all-targets', 'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
+- 'lto', 'option', 'objcarcopts', 'profiledata',
++ 'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
++ 'lto', 'option', 'objcarcopts', 'profiledata'
+ ]
++ llvm_optional_modules += ['frontendopenmp']
+ endif
+ if with_microsoft_clc
+ llvm_modules += ['target', 'linker', 'irreader', 'option', 'libdriver']
+--
+GitLab
+
diff --git a/source/x/mesa/patches/MESA_VK_DEVICE_SELECT.uint32_t.patch b/source/x/mesa/patches/MESA_VK_DEVICE_SELECT.uint32_t.patch
deleted file mode 100644
index 8f9bc231..00000000
--- a/source/x/mesa/patches/MESA_VK_DEVICE_SELECT.uint32_t.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff --git a/src/vulkan/device-select-layer/device_select.h b/src/vulkan/device-select-layer/device_select.h
-index 2335070..8debb77 100644
---- a/src/vulkan/device-select-layer/device_select.h
-+++ b/src/vulkan/device-select-layer/device_select.h
-@@ -24,10 +24,18 @@
- #define DEVICE_SELECT_H
-
- #include <stdbool.h>
-+#include <stdint.h>
- #include "xf86drm.h"
-
-+/* We don't use `drmPciDeviceInfo` because it uses 16-bit ids,
-+ * instead of Vulkan's 32-bit ones */
-+struct device_info {
-+ uint32_t vendor_id;
-+ uint32_t device_id;
-+};
-+
- struct device_pci_info {
-- drmPciDeviceInfo dev_info;
-+ struct device_info dev_info;
- drmPciBusInfo bus_info;
- bool has_bus_info;
- bool cpu_device;
-diff --git a/src/vulkan/device-select-layer/device_select_layer.c b/src/vulkan/device-select-layer/device_select_layer.c
-index 5b708bc..bd18511 100644
---- a/src/vulkan/device-select-layer/device_select_layer.c
-+++ b/src/vulkan/device-select-layer/device_select_layer.c
-@@ -222,7 +222,7 @@ static void print_gpu(const struct instance_info *info, unsigned index, VkPhysic
- type = "CPU";
- break;
- }
-- fprintf(stderr, " GPU %d: %x:%x \"%s\" %s", index, properties.properties.vendorID,
-+ fprintf(stderr, " GPU %d: 0x%04x:0x%04x \"%s\" %s", index, properties.properties.vendorID,
- properties.properties.deviceID, properties.properties.deviceName, type);
- if (info->has_pci_bus)
- fprintf(stderr, " %04x:%02x:%02x.%x", ext_pci_properties.pciDomain,
-@@ -267,18 +267,18 @@ static int device_select_find_explicit_default(struct device_pci_info *pci_infos
- uint32_t device_count,
- const char *selection)
- {
-- int default_idx = -1;
-- unsigned vendor_id, device_id;
-+ uint32_t vendor_id, device_id;
- int matched = sscanf(selection, "%x:%x", &vendor_id, &device_id);
-- if (matched != 2)
-- return default_idx;
-+ if (matched != 2) {
-+ return -1;
-+ }
-
- for (unsigned i = 0; i < device_count; ++i) {
- if (pci_infos[i].dev_info.vendor_id == vendor_id &&
- pci_infos[i].dev_info.device_id == device_id)
-- default_idx = i;
-+ return i;
- }
-- return default_idx;
-+ return -1;
- }
-
- static int device_select_find_dri_prime_tag_default(struct device_pci_info *pci_infos,
-@@ -378,8 +378,14 @@ static uint32_t get_default_device(const struct instance_info *info,
- cpu_count += fill_drm_device_info(info, &pci_infos[i], pPhysicalDevices[i]) ? 1 : 0;
- }
-
-- if (selection)
-+ if (selection) {
- default_idx = device_select_find_explicit_default(pci_infos, physical_device_count, selection);
-+ if (default_idx == -1) {
-+ fprintf(stderr, "device-select: cannot find device vendorID:deviceID match "
-+ "using MESA_VK_DEVICE_SELECT=%s. Use 'list' for available devices.\n", selection);
-+ exit(0);
-+ }
-+ }
- if (default_idx == -1 && info->has_pci_bus && dri_prime && !dri_prime_is_one)
- default_idx = device_select_find_dri_prime_tag_default(pci_infos, physical_device_count, dri_prime);
- if (default_idx == -1 && info->has_wayland)