[packages/Mesa] fix zink compilation on x32
atler
atler at pld-linux.org
Sat May 8 11:44:51 CEST 2021
commit 6406ffb2ffba634aef1fa49f9cc9693a26516be8
Author: Jan Palus <atler at pld-linux.org>
Date: Sat May 8 11:42:53 2021 +0200
fix zink compilation on x32
Mesa.spec | 2 ++
zink_x32.patch | 29 +++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
---
diff --git a/Mesa.spec b/Mesa.spec
index 19b1d2a..0304768 100644
--- a/Mesa.spec
+++ b/Mesa.spec
@@ -78,6 +78,7 @@ Group: X11/Libraries
Source0: https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-%{version}/mesa-mesa-%{version}.tar.bz2
# Source0-md5: 7482dd659c3708bdda247c96449d9d79
Patch0: nouveau_no_rtti.patch
+Patch1: zink_x32.patch
URL: http://www.mesa3d.org/
%{?with_opencl_spirv:BuildRequires: SPIRV-LLVM-Translator-devel >= 8.0.1.3}
%{?with_gallium_zink:BuildRequires: Vulkan-Loader-devel}
@@ -1431,6 +1432,7 @@ radv - eksperymentalny sterownik Vulkan dla GPU firmy AMD.
%prep
%setup -q -n mesa-mesa-%{version}
%patch0 -p1
+%patch1 -p1
%build
%if %{with opencl}
diff --git a/zink_x32.patch b/zink_x32.patch
new file mode 100644
index 0000000..1de334d
--- /dev/null
+++ b/zink_x32.patch
@@ -0,0 +1,29 @@
+--- mesa-mesa-21.1.0/src/gallium/drivers/zink/zink_framebuffer.c.orig 2021-05-05 19:05:43.000000000 +0200
++++ mesa-mesa-21.1.0/src/gallium/drivers/zink/zink_framebuffer.c 2021-05-08 11:40:04.291968475 +0200
+@@ -64,7 +64,7 @@
+ struct zink_framebuffer *fb)
+ {
+ hash_table_foreach(&fb->objects, he) {
+-#if defined(_WIN64) || defined(__x86_64__)
++#if defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__))
+ vkDestroyFramebuffer(screen->dev, he->data, NULL);
+ #else
+ VkFramebuffer *ptr = he->data;
+@@ -89,7 +89,7 @@
+
+ struct hash_entry *he = _mesa_hash_table_search_pre_hashed(&fb->objects, hash, rp);
+ if (he) {
+-#if defined(_WIN64) || defined(__x86_64__)
++#if defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__))
+ ret = (VkFramebuffer)he->data;
+ #else
+ VkFramebuffer *ptr = he->data;
+@@ -109,7 +109,7 @@
+
+ if (vkCreateFramebuffer(screen->dev, &fci, NULL, &ret) != VK_SUCCESS)
+ return;
+-#if defined(_WIN64) || defined(__x86_64__)
++#if defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__))
+ _mesa_hash_table_insert_pre_hashed(&fb->objects, hash, rp, ret);
+ #else
+ VkFramebuffer *ptr = ralloc(fb, VkFramebuffer);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/Mesa.git/commitdiff/6406ffb2ffba634aef1fa49f9cc9693a26516be8
More information about the pld-cvs-commit
mailing list