From 0a556531e0a9e86f05c447a5518ffec3967f62326af364aeadb5b6701e113250 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 2 Nov 2022 09:46:49 +0000 Subject: [PATCH 1/2] - moved drirc.d config snippets from Mesa to Mea-dri package; radv driver specific conf was missing completely (boo#1204866) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1152 --- Mesa.changes | 6 ++++++ Mesa.spec | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Mesa.changes b/Mesa.changes index e611f47..429e292 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 2 08:53:22 UTC 2022 - Stefan Dirsch + +- moved drirc.d config snippets from Mesa to Mea-dri package; + radv driver specific conf was missing completely (boo#1204866) + ------------------------------------------------------------------- Fri Oct 21 09:41:37 UTC 2022 - Fabian Vogt diff --git a/Mesa.spec b/Mesa.spec index 5d80122..ff75df0 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -889,9 +889,6 @@ rm -f %{buildroot}/%{_libdir}/pkgconfig/wayland-egl.pc # Delete things that we do not package in the Mesa-drivers variant, but can # not disable from buildling and installing. -# in Mesa -rm -rf %{buildroot}/%{_datadir}/drirc.d - rm -f %{buildroot}/%{_libdir}/libEGL.so* # in Mesa-libEGL-devel rm %{buildroot}/%{_includedir}/EGL/egl.h @@ -926,6 +923,8 @@ rm -rf %{buildroot}/%{_includedir}/KHR rm -f %{buildroot}/%{_libdir}/vdpau/libvdpau_gallium.so %else +# package in Mesa-dri +rm -rf %{buildroot}/%{_datadir}/drirc.d rm -f %{buildroot}/%{_libdir}/dri/*_dri.so @@ -991,8 +990,6 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen %files %license docs/license.rst %doc docs/README* -%dir %{_datadir}/drirc.d -%config %{_datadir}/drirc.d/* %files libEGL1 %{_libdir}/libEGL_mesa.so* @@ -1107,6 +1104,8 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen %if "%{flavor}" == "drivers" %files -n Mesa-dri +%dir %{_datadir}/drirc.d +%config %{_datadir}/drirc.d/* %dir %{_libdir}/dri %{_libdir}/dri/*_dri.so %ifarch %{ix86} x86_64 aarch64 %{arm} ppc64 ppc64le riscv64 From a66bc80d40740b4dd2e1fa5758da3cb0aed200aaa725740f137fa1262c5c0104 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 2 Nov 2022 17:01:32 +0000 Subject: [PATCH 2/2] - u_nouveau-corrupted-colors-boo1203949.patch * fixes corrupted colors in videos on nouveau with Kepler in Firefox (boo#1203949, issue#7416) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1153 --- Mesa.changes | 7 +++ Mesa.spec | 2 + u_nouveau-corrupted-colors-boo1203949.patch | 51 +++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 u_nouveau-corrupted-colors-boo1203949.patch diff --git a/Mesa.changes b/Mesa.changes index 429e292..fabadd6 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 2 16:56:33 UTC 2022 - Stefan Dirsch + +- u_nouveau-corrupted-colors-boo1203949.patch + * fixes corrupted colors in videos on nouveau with Kepler in + Firefox (boo#1203949, issue#7416) + ------------------------------------------------------------------- Wed Nov 2 08:53:22 UTC 2022 - Stefan Dirsch diff --git a/Mesa.spec b/Mesa.spec index ff75df0..9497379 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -143,6 +143,7 @@ Patch201: u_0001-gallivm-Fix-LLVM-optimization-with-the-new-pass-mana.patc Patch300: n_buildfix-21.3.0.patch Patch400: n_no-sse2-on-ix86-except-for-intel-drivers.patch Patch500: n_stop-iris-flicker.patch +Patch600: u_nouveau-corrupted-colors-boo1203949.patch %ifarch %{ix86} x86_64 BuildRequires: DirectX-Headers %endif @@ -767,6 +768,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch400 -p1 %endif %patch500 -p1 +%patch600 -p1 # Remove requires to vulkan libs from baselibs.conf on platforms # where vulkan build is disabled; ugly ... diff --git a/u_nouveau-corrupted-colors-boo1203949.patch b/u_nouveau-corrupted-colors-boo1203949.patch new file mode 100644 index 0000000..acfa18b --- /dev/null +++ b/u_nouveau-corrupted-colors-boo1203949.patch @@ -0,0 +1,51 @@ +From 6014a642ae24e37c287adbf41d615efa18d0da3d Mon Sep 17 00:00:00 2001 +From: Joan Bruguera +Date: Tue, 1 Nov 2022 23:01:50 +0100 +Subject: [PATCH] nv50/ir/nir: ignore sampler for TXF/TXQ ops. + +Recently, a regression was reported where videos in Firefox had shifted/ +glitched colors on certain Kepler hardware. This was bisected to +bf02bffe156214dad942f56ee68c380d1968704f, however, the issue already +existed but didn't hit users until TGSI was switched to NIR as default. + +The issue was traced to a YUV-to-RGB fragment shader used by Firefox, +which uses three samplers for the Y/U/V components. The Y component was +handled correctly, but the U/V components were bogus, causing the issue. + +After analysis, it appears the TXF/TXQ ops. should only handle the texture +(r) but not the sampler (s), see 63b850403c90f33c295d3ad6be4ad749d4ea6274 +and 346ce0b98832e33d5411200002571b3edea9e2bb. +Similarly, handleTXQ/handleTXF on nv50_ir_from_tgsi always sets s=0. +Only Kepler was affected because other hardware ignores s at codegen. + +Always set s=0 on NIR for TXF/TXQ, to keep TGSI behavior and fix the +regression. + +Thanks: Karol Herbst and M Henning for help diagnosing the issue. +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7416 +Cc: mesa-stable +Suggested-by: Karol Herbst +Reviewed-by: Karol Herbst +Reviewed-by: M Henning +Signed-off-by: Joan Bruguera +Part-of: +--- + src/nouveau/codegen/nv50_ir_from_nir.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/nouveau/codegen/nv50_ir_from_nir.cpp b/src/nouveau/codegen/nv50_ir_from_nir.cpp +index cbefa93d25fa..4550acbf180d 100644 +--- a/src/nouveau/codegen/nv50_ir_from_nir.cpp ++++ b/src/nouveau/codegen/nv50_ir_from_nir.cpp +@@ -3133,6 +3133,8 @@ Converter::visit(nir_tex_instr *insn) + + r = bindless ? 0xff : insn->texture_index; + s = bindless ? 0x1f : insn->sampler_index; ++ if (op == OP_TXF || op == OP_TXQ) ++ s = 0; + + defs.resize(newDefs.size()); + for (uint8_t d = 0u; d < newDefs.size(); ++d) { +-- +GitLab +