Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package webkit2gtk3 for openSUSE:Factory checked in at 2023-11-05 12:18:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/webkit2gtk3 (Old) and /work/SRC/openSUSE:Factory/.webkit2gtk3.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "webkit2gtk3" Sun Nov 5 12:18:31 2023 rev:179 rq:1123045 version:2.42.1 Changes: -------- --- /work/SRC/openSUSE:Factory/webkit2gtk3/webkit2gtk3.changes 2023-10-26 17:11:44.854382133 +0200 +++ /work/SRC/openSUSE:Factory/.webkit2gtk3.new.17445/webkit2gtk3.changes 2023-11-05 12:18:38.784812439 +0100 @@ -1,0 +2,6 @@ +Wed Nov 1 19:52:33 UTC 2023 - Mike Gorse <mgo...@suse.com> + +- Add webkit2gtk3-disable-dmabuf-nvidia.patch: disable DMABuf + renderer for NVIDIA proprietary drivers (boo#1216778). + +------------------------------------------------------------------- New: ---- webkit2gtk3-disable-dmabuf-nvidia.patch BETA DEBUG BEGIN: New: - Add webkit2gtk3-disable-dmabuf-nvidia.patch: disable DMABuf renderer for NVIDIA proprietary drivers (boo#1216778). BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ webkit2gtk3.spec ++++++ --- /var/tmp/diff_new_pack.WHny0l/_old 2023-11-05 12:18:40.596878911 +0100 +++ /var/tmp/diff_new_pack.WHny0l/_new 2023-11-05 12:18:40.600879058 +0100 @@ -89,6 +89,8 @@ Patch0: reproducibility.patch # PATCH-FIX-UPSTREAM webkit2gtk3-create-destroy-egl-image.patch boo#1216483 mgo...@suse.com -- fix "No provider of EglDestroyImage found". Patch1: webkit2gtk3-create-destroy-egl-image.patch +# PATCH-FIX-UPSTREAM webkit2gtk3-disable-dmabuf-nvidia.patch boo#1216778 mgo...@suse.com -- disable the DMABuf renderer for NVIDIA proprietary drivers. +Patch2: webkit2gtk3-disable-dmabuf-nvidia.patch BuildRequires: Mesa-libEGL-devel BuildRequires: Mesa-libGL-devel @@ -426,6 +428,7 @@ A small test browswer from webkit, useful for testing features. # Expand %%lang_package to Obsoletes its older-name counterpart + %package -n WebKitGTK-%{_apiver}-lang Summary: Translations for package %{name} Group: System/Localization ++++++ webkit2gtk3-disable-dmabuf-nvidia.patch ++++++ From: Carlos Garcia Campos <cgar...@igalia.com> Subject: Disable DMABuf renderer for NVIDIA proprietary drivers Bug: https://bugs.webkit.org/show_bug.cgi?id=262607 Bug-Debian: https://bugs.debian.org/1039720 Origin: https://github.com/WebKit/WebKit/pull/18614 Index: webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp =================================================================== --- webkitgtk.orig/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp +++ webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp @@ -36,11 +36,13 @@ #include <WebCore/GLContext.h> #include <WebCore/IntRect.h> #include <WebCore/PlatformDisplay.h> +#include <WebCore/PlatformDisplaySurfaceless.h> #include <epoxy/egl.h> #include <wtf/glib/GUniquePtr.h> #if USE(GBM) #include <WebCore/DMABufFormat.h> +#include <WebCore/PlatformDisplayGBM.h> #include <gbm.h> static constexpr uint64_t s_dmabufInvalidModifier = uint64_t(WebCore::DMABufFormat::Modifier::Invalid); #else @@ -53,6 +55,29 @@ static constexpr uint64_t s_dmabufInvali namespace WebKit { +static bool isNVIDIA() +{ + const char* forceDMABuf = getenv("WEBKIT_FORCE_DMABUF_RENDERER"); + if (forceDMABuf && strcmp(forceDMABuf, "0")) + return false; + + std::unique_ptr<WebCore::PlatformDisplay> platformDisplay; +#if USE(GBM) + const char* disableGBM = getenv("WEBKIT_DMABUF_RENDERER_DISABLE_GBM"); + if (!disableGBM || !strcmp(disableGBM, "0")) { + if (auto* device = WebCore::PlatformDisplay::sharedDisplay().gbmDevice()) + platformDisplay = WebCore::PlatformDisplayGBM::create(device); + } +#endif + if (!platformDisplay) + platformDisplay = WebCore::PlatformDisplaySurfaceless::create(); + + WebCore::GLContext::ScopedGLContext glContext(WebCore::GLContext::createOffscreen(platformDisplay ? *platformDisplay : WebCore::PlatformDisplay::sharedDisplay())); + if (strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "NVIDIA")) + return true; + return false; +} + OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode() { static OptionSet<DMABufRendererBufferMode> mode; @@ -68,6 +93,9 @@ OptionSet<DMABufRendererBufferMode> Acce return; } + if (isNVIDIA()) + return; + mode.add(DMABufRendererBufferMode::SharedMemory); const auto& eglExtensions = WebCore::PlatformDisplay::sharedDisplay().eglExtensions();