From 200a44dcd34f8382831c4b188c601c215a42343a Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 31 Mar 2021 07:20:20 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/mesa.git#183749afb435902bcf6062305d202780c77eb0e0 --- ...k-down-the-list-below-the-sw-drivers.patch | 72 +++++++++++++++++++ mesa.spec | 45 +++++++++--- 2 files changed, 106 insertions(+), 11 deletions(-) create mode 100644 0001-drisw-move-zink-down-the-list-below-the-sw-drivers.patch diff --git a/0001-drisw-move-zink-down-the-list-below-the-sw-drivers.patch b/0001-drisw-move-zink-down-the-list-below-the-sw-drivers.patch new file mode 100644 index 0000000..1f6816c --- /dev/null +++ b/0001-drisw-move-zink-down-the-list-below-the-sw-drivers.patch @@ -0,0 +1,72 @@ +From 70259f75a5546d331b0d687227341f653a4bf544 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Thu, 25 Mar 2021 08:34:28 +1000 +Subject: [PATCH] drisw: move zink down the list below the sw drivers. + +We don't ever want drisw path picking zink as the driver, +we can revisit this when the penny wrapper work gets further +along. + +This selection causes systems with nvidia/intel dual-gpus +to try and pick the intel gpu for rendering in the nvidia +context if there is no nvidia GL driver or accel doesn't work. + +This is a partial revert of the original commit. + +Fixes: 4a3b42a717ce ("drisw: Prefer hardware-layered sw-winsys drivers over pure sw") +--- + src/gallium/auxiliary/target-helpers/inline_sw_helper.h | 6 +++--- + src/gallium/auxiliary/target-helpers/sw_helper.h | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +index c494840c44e..76eda8467b8 100644 +--- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h ++++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +@@ -81,9 +81,6 @@ sw_screen_create(struct sw_winsys *winsys) + UNUSED bool only_sw = env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false); + const char *drivers[] = { + debug_get_option("GALLIUM_DRIVER", ""), +-#if defined(GALLIUM_ZINK) +- only_sw ? "" : "zink", +-#endif + #if defined(GALLIUM_D3D12) + only_sw ? "" : "d3d12", + #endif +@@ -95,6 +92,9 @@ sw_screen_create(struct sw_winsys *winsys) + #endif + #if defined(GALLIUM_SWR) + "swr", ++#endif ++#if defined(GALLIUM_ZINK) ++ only_sw ? "" : "zink", + #endif + }; + +diff --git a/src/gallium/auxiliary/target-helpers/sw_helper.h b/src/gallium/auxiliary/target-helpers/sw_helper.h +index d9469d9f5e3..88a5086d261 100644 +--- a/src/gallium/auxiliary/target-helpers/sw_helper.h ++++ b/src/gallium/auxiliary/target-helpers/sw_helper.h +@@ -86,9 +86,6 @@ sw_screen_create(struct sw_winsys *winsys) + UNUSED bool only_sw = env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false); + const char *drivers[] = { + debug_get_option("GALLIUM_DRIVER", ""), +-#if defined(GALLIUM_ZINK) +- only_sw ? "" : "zink", +-#endif + #if defined(GALLIUM_D3D12) + only_sw ? "" : "d3d12", + #endif +@@ -100,6 +97,9 @@ sw_screen_create(struct sw_winsys *winsys) + #endif + #if defined(GALLIUM_SWR) + "swr", ++#endif ++#if defined(GALLIUM_ZINK) ++ only_sw ? "" : "zink", + #endif + }; + +-- +2.29.2 + diff --git a/mesa.spec b/mesa.spec index f9e8300..5a14ef7 100644 --- a/mesa.spec +++ b/mesa.spec @@ -21,19 +21,25 @@ %endif %ifarch %{arm} aarch64 +%if !0%{?rhel} %global with_etnaviv 1 -%global with_freedreno 1 -%global with_kmsro 1 %global with_lima 1 -%global with_panfrost 1 -%global with_tegra 1 %global with_vc4 1 %global with_v3d 1 +%endif +%global with_freedreno 1 +%global with_kmsro 1 +%global with_panfrost 1 +%global with_tegra 1 %global with_xa 1 %global platform_vulkan ,broadcom,freedreno %endif %ifnarch %{arm} s390x +%if !0%{?rhel} +%global with_r300 1 +%global with_r600 1 +%endif %global with_radeonsi 1 %endif @@ -52,7 +58,7 @@ Name: mesa Summary: Mesa graphics libraries %global ver 21.0.1 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} -Release: 1%{?dist} +Release: 3%{?dist} License: MIT URL: http://www.mesa3d.org @@ -65,6 +71,8 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt # https://gitlab.freedesktop.org/mesa/mesa/-/issues/4442 Patch0: mesa-llvm12.patch +Patch1: 0001-drisw-move-zink-down-the-list-below-the-sw-drivers.patch + BuildRequires: meson >= 0.45 BuildRequires: gcc BuildRequires: gcc-c++ @@ -328,7 +336,7 @@ cp %{SOURCE1} docs/ -Ddri-drivers=%{?dri_drivers} \ -Dosmesa=true \ %if 0%{?with_hardware} - -Dgallium-drivers=swrast,virgl,r300,nouveau%{?with_iris:,iris}%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_v3d:,v3d}%{?with_kmsro:,kmsro}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_vulkan_hw:,zink} \ + -Dgallium-drivers=swrast,virgl,nouveau%{?with_r300:,r300}%{?with_iris:,iris}%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi}%{?with_r600:,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_v3d:,v3d}%{?with_kmsro:,kmsro}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_vulkan_hw:,zink} \ %else -Dgallium-drivers=swrast,virgl \ %endif @@ -480,9 +488,13 @@ popd %{_libdir}/dri/r200_dri.so %{_libdir}/dri/nouveau_vieux_dri.so %endif +%if 0%{?with_r300} %{_libdir}/dri/r300_dri.so +%endif %if 0%{?with_radeonsi} +%if 0%{?with_r600} %{_libdir}/dri/r600_dri.so +%endif %{_libdir}/dri/radeonsi_dri.so %endif %ifarch %{ix86} x86_64 @@ -526,8 +538,10 @@ popd %{_libdir}/dri/vmwgfx_dri.so %endif %{_libdir}/dri/nouveau_drv_video.so -%if 0%{?with_radeonsi} +%if 0%{?with_r600} %{_libdir}/dri/r600_drv_video.so +%endif +%if 0%{?with_radeonsi} %{_libdir}/dri/radeonsi_drv_video.so %endif %endif @@ -556,7 +570,6 @@ popd %{_libdir}/dri/zink_dri.so %endif -%if 0%{?with_hardware} %if 0%{?with_omx} %files omx-drivers %{_libdir}/bellagio/libomx_mesa.so @@ -564,11 +577,14 @@ popd %if 0%{?with_vdpau} %files vdpau-drivers %{_libdir}/vdpau/libvdpau_nouveau.so.1* +%if 0%{?with_r300} %{_libdir}/vdpau/libvdpau_r300.so.1* -%if 0%{?with_radeonsi} -%{_libdir}/vdpau/libvdpau_r600.so.1* -%{_libdir}/vdpau/libvdpau_radeonsi.so.1* %endif +%if 0%{?with_r600} +%{_libdir}/vdpau/libvdpau_r600.so.1* +%endif +%if 0%{?with_radeonsi} +%{_libdir}/vdpau/libvdpau_radeonsi.so.1* %endif %endif @@ -598,6 +614,13 @@ popd %endif %changelog +* Fri Mar 26 2021 Adam Jackson - 21.0.1-3 +- Split out with_r300 and with_r600 +- Disable r300, r600, etnaviv, lima, vc4 and v3d in RHEL + +* Thu Mar 25 2021 Dave Airlie - 21.0.1-2 +- fix zink loading in places it shouldn't. + * Wed Mar 24 2021 Pete Walter - 21.0.1-1 - Update to 21.0.1