[packages/Mesa] fix powervr vulkan driver build on archs where unsigned long != uint64_t

atler atler at pld-linux.org
Fri May 20 12:40:03 CEST 2022


commit 55d67e600b504fc31df15c326fe977ea9c7891d4
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri May 20 12:38:36 2022 +0200

    fix powervr vulkan driver build on archs where unsigned long != uint64_t

 Mesa.spec            |  4 ++++
 powervr_uint64.patch | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)
---
diff --git a/Mesa.spec b/Mesa.spec
index 54c6174..61c2072 100644
--- a/Mesa.spec
+++ b/Mesa.spec
@@ -80,6 +80,7 @@ Group:		X11/Libraries
 Source0:	https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-%{version}/mesa-mesa-%{version}.tar.bz2
 # Source0-md5:	f7c130d69f0c6928ef1f9a250755081b
 Patch0:		zink_x32.patch
+Patch1:		powervr_uint64.patch
 URL:		https://www.mesa3d.org/
 %{?with_opencl_spirv:BuildRequires:	SPIRV-LLVM-Translator-devel >= 8.0.1.3}
 %{?with_gallium_zink:BuildRequires:	Vulkan-Loader-devel}
@@ -1423,6 +1424,9 @@ radv - eksperymentalny sterownik Vulkan dla GPU firmy AMD.
 %prep
 %setup -q -n mesa-mesa-%{version}
 %patch0 -p1
+%ifarch %{arm} aarch64
+%patch1 -p1
+%endif
 
 %build
 %if %{with opencl}
diff --git a/powervr_uint64.patch b/powervr_uint64.patch
new file mode 100644
index 0000000..4a1a35f
--- /dev/null
+++ b/powervr_uint64.patch
@@ -0,0 +1,28 @@
+From 2d46abb200f6631d8689ecf8f18d55e9c2bb2cc6 Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus at fastmail.com>
+Date: Fri, 20 May 2022 11:20:33 +0200
+Subject: [PATCH] pvr: use UINT64_C for 64-bit constant
+
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6528
+
+Signed-off-by: Jan Palus <jpalus at fastmail.com>
+---
+ src/imagination/vulkan/pvr_cmd_buffer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c b/src/imagination/vulkan/pvr_cmd_buffer.c
+index f043054bcb0b..0afd463e2fb0 100644
+--- a/src/imagination/vulkan/pvr_cmd_buffer.c
++++ b/src/imagination/vulkan/pvr_cmd_buffer.c
+@@ -2760,7 +2760,7 @@ static VkResult pvr_setup_descriptor_mappings(
+                PVR_ROGUE_PDSINST_DOUT_FIELDS_DOUTD_SRC1_BSIZE_CLRMSK;
+ 
+             PVR_WRITE(qword_buffer,
+-                      0UL,
++                      UINT64_C(0),
+                       desc_set_entry->const_offset,
+                       pds_info->data_size_in_dwords);
+ 
+-- 
+GitLab
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/Mesa.git/commitdiff/55d67e600b504fc31df15c326fe977ea9c7891d4



More information about the pld-cvs-commit mailing list