]> git.pld-linux.org Git - packages/Mesa.git/commitdiff
fix zink compilation on x32 auto/th/Mesa-21.1.0-1
authorJan Palus <atler@pld-linux.org>
Sat, 8 May 2021 09:42:53 +0000 (11:42 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 8 May 2021 09:42:53 +0000 (11:42 +0200)
Mesa.spec
zink_x32.patch [new file with mode: 0644]

index 19b1d2a4cd2340a62e1d434ca14d1c7884977500..0304768e2458d87a839c334a78c1931367cafbe7 100644 (file)
--- 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
 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}
 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
 %prep
 %setup -q -n mesa-mesa-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %if %{with opencl}
 
 %build
 %if %{with opencl}
diff --git a/zink_x32.patch b/zink_x32.patch
new file mode 100644 (file)
index 0000000..1de334d
--- /dev/null
@@ -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);
This page took 0.054202 seconds and 4 git commands to generate.