From b4c8bd0c3fd62d25555f9b5e958d8402b3d7015b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 25 Mar 2021 11:05:19 +1000 Subject: [PATCH 1/2] add missing patch --- ...k-down-the-list-below-the-sw-drivers.patch | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) 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 + From 91006274555f313507032728b1886d037a54523e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 26 Mar 2021 11:30:08 -0400 Subject: [PATCH 2/2] Split out with_r300 and with_r600 Disable r300, r600, etnaviv, lima, vc4 and v3d in RHEL None of these are up to a Vulkan 1.0 feature level, most never could be. --- mesa.spec | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/mesa.spec b/mesa.spec index 0c9f33f..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: 2%{?dist} +Release: 3%{?dist} License: MIT URL: http://www.mesa3d.org @@ -330,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 @@ -482,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 @@ -528,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 @@ -558,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 @@ -566,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 @@ -600,6 +614,10 @@ 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.