summaryrefslogtreecommitdiffstats
path: root/source/x/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'source/x/mesa')
-rwxr-xr-xsource/x/mesa/mesa.SlackBuild4
-rw-r--r--source/x/mesa/patches/mesa.f93b7d14d66d8ba70d44772d1a1b6696310b7d17.patch48
2 files changed, 50 insertions, 2 deletions
diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild
index 67ace3b5a..a10c955ba 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:-1}
+BUILD=${BUILD:-2}
BUILD_DEMOS=${BUILD_DEMOS:-YES}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -97,7 +97,7 @@ find . \
# git format-patch 93c2beafc0a7fa2f210b006d22aba61caa71f773 # 17.2.6 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
for patch in $CWD/patches/*.patch ; do
- patch -p1 < $patch || exit 1 ;
+ patch -p1 --verbose < $patch || exit 1 ;
done
fi
diff --git a/source/x/mesa/patches/mesa.f93b7d14d66d8ba70d44772d1a1b6696310b7d17.patch b/source/x/mesa/patches/mesa.f93b7d14d66d8ba70d44772d1a1b6696310b7d17.patch
new file mode 100644
index 000000000..bf3483a41
--- /dev/null
+++ b/source/x/mesa/patches/mesa.f93b7d14d66d8ba70d44772d1a1b6696310b7d17.patch
@@ -0,0 +1,48 @@
+From f93b7d14d66d8ba70d44772d1a1b6696310b7d17 Mon Sep 17 00:00:00 2001
+From: Witold Baryluk <witold.baryluk@gmail.com>
+Date: Mon, 7 Dec 2020 20:45:42 +0000
+Subject: [PATCH] vulkan/device_select: Store Vulkan vendorID and deviceID as
+ uint32_t
+
+Vulkan uses 32-bit IDs, compared to PCI/USB 16-bit ones.
+
+Some driver vendorIDs do exceed 0xffff, including MESA (used by lavapipe).
+
+Without this, the value will be truncated, and device select layer
+will not match expected (or any) device.
+
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3935
+Reviewed-by: Dave Airlie <airlied@redhat.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7977>
+---
+ src/vulkan/device-select-layer/device_select.h | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/vulkan/device-select-layer/device_select.h b/src/vulkan/device-select-layer/device_select.h
+index 23350707a33..248878fbc71 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;
+--
+GitLab
+
+