diff --git a/mesa/.signature b/mesa/.signature index ad96b4de..ebaa28fc 100644 --- a/mesa/.signature +++ b/mesa/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/xorg.pub -RWTSGWF5Q7TndN41WDKUHL6WhYWYbY53k0rJVAIUEawYAnSx97pMLHLIdsm/1LYaEgxBTnARtJow+ZoVXtIAmmX+zOov4dM5EQU= -SHA256 (Pkgfile) = 9afcb709216219bb39054d5031cbcde8eea981cf15271081699933e34c8415bb +RWTSGWF5Q7TndA/sVkxhIAk3/m30ppXTYj1gysTJf8o6wUJbzPHeSBg4p9BL6P39ql8avC9t/tOGPArrjXRr56wxfOQBHFhiPAs= +SHA256 (Pkgfile) = cde04c0d56733ca344523e2a7345e79858145009c508fe75f2dbd299db673dc1 SHA256 (.footprint) = c4135bcc05c8aa86af291fb40524dae567f84f42711691a3d73675883d37b6c9 SHA256 (mesa-24.2.1.tar.xz) = fc9a495f3a9af906838be89367564e10ef335e058f88965ad49ccc3e9a3b420b +SHA256 (30710.patch) = 7c5cfd5c767668cfc7e91542e0f837b0b4749d67a7eafe849a6565b8fc54e512 diff --git a/mesa/30710.patch b/mesa/30710.patch new file mode 100644 index 00000000..fb01363b --- /dev/null +++ b/mesa/30710.patch @@ -0,0 +1,43 @@ +From 93e96da9458c9d0348f2390dc0bea67cf140b1a0 Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Sun, 18 Aug 2024 00:08:50 +0200 +Subject: [PATCH] rusticl: do not use CL vector types in bindings and code + +Bindgen seems to miscompile them and I kinda thought I've done this +already in the past, but apparently not. + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11722 +Part-of: +--- + src/gallium/frontends/rusticl/api/device.rs | 2 +- + src/gallium/frontends/rusticl/meson.build | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/gallium/frontends/rusticl/api/device.rs b/src/gallium/frontends/rusticl/api/device.rs +index 9793092db5ad4..c1cb7902e0371 100644 +--- a/src/gallium/frontends/rusticl/api/device.rs ++++ b/src/gallium/frontends/rusticl/api/device.rs +@@ -196,7 +196,7 @@ impl CLInfo for cl_device_id { + // TODO proper retrival from devices + CL_DEVICE_MEM_BASE_ADDR_ALIGN => cl_prop::(0x1000), + CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE => { +- cl_prop::(size_of::() as cl_uint) ++ cl_prop::(16 * size_of::() as cl_uint) + } + CL_DEVICE_NAME => cl_prop::<&str>(&dev.screen().name()), + CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR => cl_prop::(1), +diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build +index 612e47bfe88e1..1fe75a611444d 100644 +--- a/src/gallium/frontends/rusticl/meson.build ++++ b/src/gallium/frontends/rusticl/meson.build +@@ -146,6 +146,7 @@ rusticl_opencl_bindings_rs = rust.bindgen( + '--raw-line', 'unsafe impl std::marker::Send for _cl_image_desc {}', + '--raw-line', 'unsafe impl std::marker::Sync for _cl_image_desc {}', + '--allowlist-type', 'cl_.*', ++ '--blocklist-type', '(__)?cl_.*[2348(16)]', + '--allowlist-type', 'cl.*_fn', + '--allowlist-var', 'CL_.*', + # needed for gl_sharing extension +-- +GitLab + diff --git a/mesa/Pkgfile b/mesa/Pkgfile index db9a68eb..2fd76a87 100644 --- a/mesa/Pkgfile +++ b/mesa/Pkgfile @@ -7,7 +7,8 @@ name=mesa version=24.2.1 release=1 -source=(https://archive.mesa3d.org/$name-$version.tar.xz) +source=(https://archive.mesa3d.org/$name-$version.tar.xz + 30710.patch) build() { prt-get isinst directx-headers && PKGMK_MESA_GALLIUM+='d3d12,' @@ -35,6 +36,8 @@ build() { printf '%s' "$version-$release" > $name-$version/VERSION + patch -Np1 -d $name-$version -i $SRC/30710.patch + meson setup build $name-$version $PKGMK_MESA \ --prefix=/usr \ --sysconfdir=/etc \