From 76a2897ad3a77ff4dda241e827ce37507bccadf4 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 9 Jul 2021 20:09:55 +1000 Subject: [PATCH] Update to mesa 21.1.3 to fix wl_drm Resolves: rhbz#1970253 --- ...k-down-the-list-below-the-sw-drivers.patch | 72 ----------- mesa-llvm12.patch | 118 ------------------ mesa.spec | 17 ++- sources | 2 +- 4 files changed, 8 insertions(+), 201 deletions(-) delete mode 100644 0001-drisw-move-zink-down-the-list-below-the-sw-drivers.patch delete mode 100644 mesa-llvm12.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 deleted file mode 100644 index 1f6816c..0000000 --- a/0001-drisw-move-zink-down-the-list-below-the-sw-drivers.patch +++ /dev/null @@ -1,72 +0,0 @@ -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-llvm12.patch b/mesa-llvm12.patch deleted file mode 100644 index d488100..0000000 --- a/mesa-llvm12.patch +++ /dev/null @@ -1,118 +0,0 @@ -From d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea Mon Sep 17 00:00:00 2001 -From: Karol Herbst -Date: Wed, 24 Feb 2021 12:44:41 +0100 -Subject: [PATCH] clover: Fix build with llvm-12. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix build error after LLVM commit c495dfe0268b ("[clang][cli] NFC: -Decrease the scope of ParseLangArgs parameters"). - -../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector >&, std::string&)’: -../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector >&’ - 252 | c->getPreprocessorOpts(), - | ~~~~~~~~~~~~~~~~~~~~~~^~ - | | - | clang::PreprocessorOptions - -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114 -Signed-off-by: Karol Herbst -Reviewed-by: Francisco Jerez -Part-of: ---- - src/gallium/frontends/clover/llvm/compat.hpp | 22 +++++++++++++++---- - .../frontends/clover/llvm/invocation.cpp | 5 ++--- - 2 files changed, 20 insertions(+), 7 deletions(-) - -diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp -index 78eb8c982a8..d537819f292 100644 ---- a/src/gallium/frontends/clover/llvm/compat.hpp -+++ b/src/gallium/frontends/clover/llvm/compat.hpp -@@ -38,14 +38,14 @@ - - #include - -+#include -+#include -+#include - #include - #include -+#include - #include - #include --#include -- --#include --#include - - #include - #include -@@ -88,6 +88,20 @@ namespace clover { - cinv, copts.data(), copts.data() + copts.size(), diag); - #endif - } -+ -+ static inline void -+ compiler_set_lang_defaults(std::unique_ptr &c, -+ clang::InputKind ik, const ::llvm::Triple& triple, -+ clang::LangStandard::Kind d) -+ { -+ c->getInvocation().setLangDefaults(c->getLangOpts(), ik, triple, -+#if LLVM_VERSION_MAJOR >= 12 -+ c->getPreprocessorOpts().Includes, -+#else -+ c->getPreprocessorOpts(), -+#endif -+ d); -+ } - } - } - } -diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp -index 536e952b100..30592e4343b 100644 ---- a/src/gallium/frontends/clover/llvm/invocation.cpp -+++ b/src/gallium/frontends/clover/llvm/invocation.cpp -@@ -247,9 +247,8 @@ namespace { - // http://www.llvm.org/bugs/show_bug.cgi?id=19735 - c->getDiagnosticOpts().ShowCarets = false; - -- c->getInvocation().setLangDefaults(c->getLangOpts(), -- compat::ik_opencl, ::llvm::Triple(target.triple), -- c->getPreprocessorOpts(), -+ compat::compiler_set_lang_defaults(c, compat::ik_opencl, -+ ::llvm::Triple(target.triple), - get_language_version(opts, device_clc_version)); - - c->createDiagnostics(new clang::TextDiagnosticPrinter( --- -GitLab - -From f0dccd957879ff642cfd921dda6e8b04dd35fec4 Mon Sep 17 00:00:00 2001 -From: Karol Herbst -Date: Tue, 2 Mar 2021 20:09:39 +0100 -Subject: [PATCH] clover: Add missing include for llvm-12 build fix - -Fixes: d1eab2b1eb1 ("clover: Fix build with llvm-12.") -Signed-off-by: Karol Herbst -Reviewed-by: Francisco Jerez -Part-of: ---- - src/gallium/frontends/clover/llvm/compat.hpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp -index d537819f292..380d16a8346 100644 ---- a/src/gallium/frontends/clover/llvm/compat.hpp -+++ b/src/gallium/frontends/clover/llvm/compat.hpp -@@ -49,6 +49,7 @@ - - #include - #include -+#include - - #if LLVM_VERSION_MAJOR >= 10 - #include --- -GitLab - diff --git a/mesa.spec b/mesa.spec index 433ff03..4d81512 100644 --- a/mesa.spec +++ b/mesa.spec @@ -56,9 +56,9 @@ Name: mesa Summary: Mesa graphics libraries -%global ver 21.0.1 +%global ver 21.1.3 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} -Release: 5%{?dist} +Release: 1%{?dist} License: MIT URL: http://www.mesa3d.org @@ -68,11 +68,6 @@ Source0: https://mesa.freedesktop.org/archive/%{name}-%{ver}.tar.xz # Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD. 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++ @@ -348,7 +343,7 @@ cp %{SOURCE1} docs/ -Dgallium-nine=%{?with_nine:true}%{!?with_nine:false} \ -Dgallium-opencl=%{?with_opencl:icd}%{!?with_opencl:disabled} \ -Dvulkan-drivers=%{?vulkan_drivers} \ - -Dvulkan-device-select-layer=true \ + -Dvulkan-layers=device-select \ -Dshared-glapi=enabled \ -Dgles1=disabled \ -Dgles2=enabled \ @@ -608,12 +603,14 @@ popd %endif %endif -%files vulkan-devel %ifarch %{ix86} x86_64 -%{_includedir}/vulkan/vulkan_intel.h +%files vulkan-devel %endif %changelog +* Fri Jul 09 2021 Dave Airlie - 21.1.3-1 +- Update to mesa 21.1.3 to fix wl_drm + * Tue Apr 20 2021 Dave Airlie - 21.0.1-5 - Fix FTBFS (#1951279) diff --git a/sources b/sources index a80ab6f..f4d7471 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mesa-21.0.1.tar.xz) = b31b78778b6092dfaf0712f90de3074217574389c4236f8379c127739874f6bd1b47883140a26445d25e58df87e6207278efd048453096ee710d334b1dcfe419 +SHA512 (mesa-21.1.3.tar.xz) = 8ca6d5516035484ea2a63bc6338794003ef167239ab0c220f8d3693f97f9725b46fc9d9a704c4ba11b83197d4b8e5f658d65ef0cce1e0957f5e58bd13726b9e0