From fd745a4cbdc0499977103281cdd5423ea0cf3ba6 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Nov 18 2023 12:05:15 +0000 Subject: [PATCH 1/3] Bump to asahi-20231118 pre-release tag Adds more kmsro drivers. --- diff --git a/gallium-Avoid-empty-version-scripts-in-pipe-loader.patch b/gallium-Avoid-empty-version-scripts-in-pipe-loader.patch new file mode 100644 index 0000000..b93509c --- /dev/null +++ b/gallium-Avoid-empty-version-scripts-in-pipe-loader.patch @@ -0,0 +1,53 @@ +From 7571b6c6781fab6504214565d4a616fb1ca25107 Mon Sep 17 00:00:00 2001 +From: Janne Grunau +Date: Sat, 18 Nov 2023 12:23:26 +0100 +Subject: [PATCH 1/1] gallium: Avoid empty version scripts in pipe-loader + +The code produces version scripts with an empty global node for diabled +drivers. This is reported as syntax error by the linker. +The root cause of the problem is that the version scripts are +accumulated in the out of foreach `pipe_loader_link_args` although they +should be only used once for their driver specific loader shared +library. + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10166 +Fixes: 667de678a06 ("gallium: Fix undefined symbols in version scripts") +Signed-off-by: Janne Grunau +--- + src/gallium/targets/pipe-loader/meson.build | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/gallium/targets/pipe-loader/meson.build b/src/gallium/targets/pipe-loader/meson.build +index ee34d79492b..b288c2c73ac 100644 +--- a/src/gallium/targets/pipe-loader/meson.build ++++ b/src/gallium/targets/pipe-loader/meson.build +@@ -80,11 +80,13 @@ foreach x : pipe_loaders + + pipe_sym = configure_file(input : 'pipe.sym.in', output : 'pipe_@0@.sym'.format(x[1]), configuration : pipe_sym_config) + ++ cur_pipe_loader_link_args = pipe_loader_link_args ++ cur_pipe_loader_link_deps = pipe_loader_link_deps + if with_ld_version_script +- pipe_loader_link_args += [ ++ cur_pipe_loader_link_args += [ + '-Wl,--version-script', join_paths(meson.current_build_dir(), 'pipe_@0@.sym'.format(x[1])) + ] +- pipe_loader_link_deps += pipe_sym ++ cur_pipe_loader_link_deps += pipe_sym + endif + + if x[0] +@@ -94,8 +96,8 @@ foreach x : pipe_loaders + c_args : [pipe_loader_comp_args, '-DPIPE_LOADER_DYNAMIC=1'], + cpp_args : [pipe_loader_comp_args], + gnu_symbol_visibility : 'hidden', +- link_args : pipe_loader_link_args, +- link_depends : pipe_loader_link_deps, ++ link_args : cur_pipe_loader_link_args, ++ link_depends : cur_pipe_loader_link_deps, + include_directories : pipe_loader_incs, + link_with : [pipe_loader_link_with, x[3]], + dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]], +-- +2.42.1 + diff --git a/mesa.spec b/mesa.spec index cb8e91e..a705e8e 100644 --- a/mesa.spec +++ b/mesa.spec @@ -61,11 +61,10 @@ %global vulkan_drivers swrast%{?base_vulkan}%{?intel_platform_vulkan}%{?extra_platform_vulkan} -%global asahi_mesa_ver 20230904 +%global asahi_mesa_ver 20231118 %global git_tag asahi-%{asahi_mesa_ver} -%global basever 23.3.0 -%global pkgrelease 1 -%global ver %{basever}-asahipre%{asahi_mesa_ver}^post%{pkgrelease} +%global basever 24.0.0 +%global ver %{basever}-asahipre%{asahi_mesa_ver} Name: mesa @@ -82,6 +81,7 @@ Source0: https://gitlab.freedesktop.org/asahi/mesa/-/archive/%{git_tag}/m Source1: Mesa-MLAA-License-Clarification-Email.txt Patch10: gnome-shell-glthread-disable.patch +Patch20: gallium-Avoid-empty-version-scripts-in-pipe-loader.patch BuildRequires: meson >= 1.2.0 BuildRequires: gcc @@ -608,19 +608,25 @@ popd %if 0%{?with_kmsro} %{_libdir}/dri/armada-drm_dri.so %{_libdir}/dri/exynos_dri.so +%{_libdir}/dri/gm12u320_dri.so +%{_libdir}/dri/hdlcd_dri.so %{_libdir}/dri/hx8357d_dri.so +%{_libdir}/dri/ili9163_dri.so %{_libdir}/dri/ili9225_dri.so %{_libdir}/dri/ili9341_dri.so +%{_libdir}/dri/ili9486_dri.so %{_libdir}/dri/imx-dcss_dri.so %{_libdir}/dri/mediatek_dri.so %{_libdir}/dri/meson_dri.so %{_libdir}/dri/mi0283qt_dri.so +%{_libdir}/dri/panel-mipi-dbi_dri.so %{_libdir}/dri/pl111_dri.so %{_libdir}/dri/repaper_dri.so %{_libdir}/dri/rockchip_dri.so %{_libdir}/dri/st7586_dri.so %{_libdir}/dri/st7735r_dri.so %{_libdir}/dri/sun4i-drm_dri.so +%{_libdir}/dri/udl_dri.so %endif %if 0%{?with_vulkan_hw} %{_libdir}/dri/zink_dri.so diff --git a/sources b/sources index b31755d..707d66e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mesa-asahi-20230904.tar.gz) = ca2a2afdd17b491c6f4b746cb426154d50caf45db8a01f449f295c90300d1036ea51ceac81a2036e63fe0ecee9c582e1313d5d924015688d6dee29eba3fab76e +SHA512 (mesa-asahi-20231118.tar.gz) = 4c72fb517eda7a8935c49824de97521b001942511659c250070732b8d405a9cb55885beafb21b810770e36d2e6528664cd5fbf505326234f58771365b1be9e7a From c03a2c849914d948109c85d6caf98ef4d5d1c7e6 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Nov 19 2023 10:24:13 +0000 Subject: [PATCH 2/3] Fix x86 build with 20231118 pre-release --- diff --git a/gallium-Do-not-create-pipe-loader-version-scripts-fo.patch b/gallium-Do-not-create-pipe-loader-version-scripts-fo.patch new file mode 100644 index 0000000..479ec44 --- /dev/null +++ b/gallium-Do-not-create-pipe-loader-version-scripts-fo.patch @@ -0,0 +1,70 @@ +From 2091515a70a07c3e4b80cb7637a2194790e285bb Mon Sep 17 00:00:00 2001 +From: Janne Grunau +Date: Sun, 19 Nov 2023 09:34:59 +0100 +Subject: [PATCH 2/2] gallium: Do not create pipe-loader version scripts for + disabled drivers + +They are not going to be used without shared library to build. + +Fixes: 667de678a06 ("gallium: Fix undefined symbols in version scripts") +Signed-off-by: Janne Grunau +Part-of: +--- + src/gallium/targets/pipe-loader/meson.build | 36 +++++++++++---------- + 1 file changed, 19 insertions(+), 17 deletions(-) + +diff --git a/src/gallium/targets/pipe-loader/meson.build b/src/gallium/targets/pipe-loader/meson.build +index b7a04c9d7226..943faec469d0 100644 +--- a/src/gallium/targets/pipe-loader/meson.build ++++ b/src/gallium/targets/pipe-loader/meson.build +@@ -63,6 +63,10 @@ pipe_loaders = [ + ] + + foreach x : pipe_loaders ++ if not x[0] ++ continue ++ endif ++ + pipe_sym_config = configuration_data() + + foreach d : [[x[1] in ['r300', 'r600', 'radeonsi'], 'radeon_drm_winsys_create'], +@@ -88,21 +92,19 @@ foreach x : pipe_loaders + cur_pipe_loader_link_deps += pipe_sym + endif + +- if x[0] +- shared_library( +- 'pipe_@0@'.format(x[1]), +- 'pipe_@0@.c'.format(x[1]), +- c_args : [pipe_loader_comp_args, '-DPIPE_LOADER_DYNAMIC=1'], +- cpp_args : [pipe_loader_comp_args], +- gnu_symbol_visibility : 'hidden', +- link_args : cur_pipe_loader_link_args, +- link_depends : cur_pipe_loader_link_deps, +- include_directories : pipe_loader_incs, +- link_with : [pipe_loader_link_with, x[3]], +- dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]], +- name_prefix : '', +- install : true, +- install_dir : pipe_loader_install_dir, +- ) +- endif ++ shared_library( ++ 'pipe_@0@'.format(x[1]), ++ 'pipe_@0@.c'.format(x[1]), ++ c_args : [pipe_loader_comp_args, '-DPIPE_LOADER_DYNAMIC=1'], ++ cpp_args : [pipe_loader_comp_args], ++ gnu_symbol_visibility : 'hidden', ++ link_args : cur_pipe_loader_link_args, ++ link_depends : cur_pipe_loader_link_deps, ++ include_directories : pipe_loader_incs, ++ link_with : [pipe_loader_link_with, x[3]], ++ dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]], ++ name_prefix : '', ++ install : true, ++ install_dir : pipe_loader_install_dir, ++ ) + endforeach +-- +2.41.0 + diff --git a/gallium-Fix-i915-pipe-loader-build.patch b/gallium-Fix-i915-pipe-loader-build.patch new file mode 100644 index 0000000..c581c28 --- /dev/null +++ b/gallium-Fix-i915-pipe-loader-build.patch @@ -0,0 +1,36 @@ +From b2da38413f5aaef0c225dcf730cfcd0d338d2f3e Mon Sep 17 00:00:00 2001 +From: Janne Grunau +Date: Sun, 19 Nov 2023 09:06:11 +0100 +Subject: [PATCH 1/2] gallium: Fix i915 pipe-loader build + +'i915' was missing from the list of drivers for the 'driver_descriptor' +descriptor symbol. Rather than maintaining a second list of drivers add +the 'driver_descriptor' symbol for all drivers except swrast. + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10171 +Fixes: 667de678a06 ("gallium: Fix undefined symbols in version scripts") +Signed-off-by: Janne Grunau +Part-of: +--- + src/gallium/targets/pipe-loader/meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/gallium/targets/pipe-loader/meson.build b/src/gallium/targets/pipe-loader/meson.build +index b288c2c73acb..b7a04c9d7226 100644 +--- a/src/gallium/targets/pipe-loader/meson.build ++++ b/src/gallium/targets/pipe-loader/meson.build +@@ -66,10 +66,9 @@ foreach x : pipe_loaders + pipe_sym_config = configuration_data() + + foreach d : [[x[1] in ['r300', 'r600', 'radeonsi'], 'radeon_drm_winsys_create'], +- [x[1] in ['vmwgfx', 'r600', 'r300', 'nouveau', 'msm', 'kmsro', 'iris', 'crocus', 'radeonsi'], +- 'driver_descriptor'], + [x[1] == 'radeonsi', 'amdgpu_winsys_create'], + [x[1] == 'radeonsi' and with_llvm, 'ac_init_shared_llvm_once'], ++ [x[1] != 'swrast', 'driver_descriptor'], + [x[1] == 'swrast', 'swrast_driver_descriptor']] + if d[0] + pipe_sym_config.set(d[1], d[1] + ';') +-- +2.41.0 + diff --git a/mesa.spec b/mesa.spec index a705e8e..6b832a2 100644 --- a/mesa.spec +++ b/mesa.spec @@ -82,6 +82,8 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt Patch10: gnome-shell-glthread-disable.patch Patch20: gallium-Avoid-empty-version-scripts-in-pipe-loader.patch +Patch21: gallium-Fix-i915-pipe-loader-build.patch +Patch22: gallium-Do-not-create-pipe-loader-version-scripts-fo.patch BuildRequires: meson >= 1.2.0 BuildRequires: gcc From 618ad012fe7e87024fadc1fb5b08f53da3727482 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Nov 19 2023 10:24:50 +0000 Subject: [PATCH 3/3] Add asahi libclc build dependency for geometry shader support --- diff --git a/mesa.spec b/mesa.spec index 6b832a2..643d676 100644 --- a/mesa.spec +++ b/mesa.spec @@ -147,6 +147,8 @@ BuildRequires: llvm-devel >= 7.0.0 BuildRequires: clang-devel BuildRequires: bindgen BuildRequires: rust-packaging +%endif +%if 0%{?with_opencl} || 0%{?with_asahi} BuildRequires: pkgconfig(libclc) BuildRequires: pkgconfig(SPIRV-Tools) BuildRequires: pkgconfig(LLVMSPIRVLib)