diff --git a/PKGBUILD b/PKGBUILD index fe8e263e..cd2d49a5 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,13 +9,13 @@ # Contributor: Daniel J Griffiths pkgname=ungoogled-chromium -pkgver=128.0.6613.137 +pkgver=129.0.6668.58 pkgrel=1 _launcher_ver=8 _system_clang=1 # ungoogled chromium variables _uc_usr=ungoogled-software -_uc_ver=128.0.6613.137-1 +_uc_ver=129.0.6668.58-1 pkgdesc="A lightweight approach to removing Google web service dependency" arch=('x86_64') url="https://github.com/ungoogled-software/ungoogled-chromium" @@ -38,7 +38,6 @@ options=('!lto') # Chromium adds its own flags for ThinLTO source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz $pkgname-$_uc_ver.tar.gz::https://github.com/$_uc_usr/ungoogled-chromium/archive/$_uc_ver.tar.gz https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz - allow-ANGLEImplementation-kVulkan.patch compiler-rt-adjust-paths.patch increase-fortify-level.patch use-oauth2-client-switches-as-default.patch @@ -46,11 +45,12 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom 0001-enable-linux-unstable-deb-target.patch 0001-ozone-wayland-implement-text_input_manager_v3.patch 0001-ozone-wayland-implement-text_input_manager-fixes.patch - 0001-vaapi-flag-ozone-wayland.patch) -sha256sums=('e1d39c170dfdc2627a7b003e11d77f04a578b8e1cfe41e714cdaa345c91f4943' - '94e2f80f72b1c0f791c826c734a676cd0cb60ebaaf2a8a4941a8475a15f5508d' + 0001-vaapi-flag-ozone-wayland.patch + p010-Zero-Copy-for-VA-API-Decoding-for-Vulkan.patch + add-feature-to-allow-zero-copy-video-formats.patch) +sha256sums=('eaf850183d32627ce0cde9f3d3f853bc11c217ef7f41540303214ed47803d96d' + 'a52872325dcf1121acbabec781edfabe068a50a9080e81e69b249dd6301f2eac' '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' - '1a5bc75a90abad153c8eb6dbdce138132a5f11190b0a40c925958a72d706b2aa' 'b3de01b7df227478687d7517f61a777450dca765756002c80c4915f271e2d961' 'd634d2ce1fc63da7ac41f432b1e84c59b7cceabf19d510848a7cff40c8025342' 'a9b417b96daec33c9059065e15b3a92ae1bf4b59f89d353659b335d9e0379db6' @@ -58,7 +58,9 @@ sha256sums=('e1d39c170dfdc2627a7b003e11d77f04a578b8e1cfe41e714cdaa345c91f4943' '2a44756404e13c97d000cc0d859604d6848163998ea2f838b3b9bb2c840967e3' 'd9974ddb50777be428fd0fa1e01ffe4b587065ba6adefea33678e1b3e25d1285' 'a2da75d0c20529f2d635050e0662941c0820264ea9371eb900b9d90b5968fa6a' - '9a5594293616e1390462af1f50276ee29fd6075ffab0e3f944f6346cb2eb8aec') + '9a5594293616e1390462af1f50276ee29fd6075ffab0e3f944f6346cb2eb8aec' + '40db59162df2b7a2c0387bd620802f15424f637c09ba305b674fc09410ab21d1' + '713dab4f8c26790c0e4a4c5ce6a9269e90446df5370cc14214a01a363f7afe39') # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py # Keys are the names in the above script; values are the dependencies in Arch @@ -75,7 +77,7 @@ declare -gA _system_libs=( #[libaom]=aom #[libavif]=libavif # needs -DAVIF_ENABLE_EXPERIMENTAL_GAIN_MAP=ON [libdrm]= - [libjpeg]=libjpeg + [libjpeg]=libjpeg-turbo [libpng]=libpng #[libvpx]=libvpx [libwebp]=libwebp @@ -112,7 +114,8 @@ prepare() { patch -Np1 -i ../use-oauth2-client-switches-as-default.patch # Upstream fixes - patch -Np1 -i ../allow-ANGLEImplementation-kVulkan.patch + patch -Np1 -i ../p010-Zero-Copy-for-VA-API-Decoding-for-Vulkan.patch + patch -Np1 -i ../add-feature-to-allow-zero-copy-video-formats.patch # Allow libclang_rt.builtins from compiler-rt >= 16 to be used patch -Np1 -i ../compiler-rt-adjust-paths.patch diff --git a/add-feature-to-allow-zero-copy-video-formats.patch b/add-feature-to-allow-zero-copy-video-formats.patch new file mode 100644 index 00000000..dd4ab91e --- /dev/null +++ b/add-feature-to-allow-zero-copy-video-formats.patch @@ -0,0 +1,62 @@ +From fb42a91ffae45f6a7c1639ebf0f1622b7c346d1d Mon Sep 17 00:00:00 2001 +From: Robert Mader +Date: Thu, 5 Sep 2024 23:56:20 +0000 +Subject: [PATCH] media: Add feature to allow zero-copy video formats with GL + on Linux + +With EGL formats like NV12 can usually be imported directly from VA-API +and V4L2 decoders. Doing so can improve performance a lot - and in cases +where there is no PP to convert to RGB, not supporting it can break HW +decoding altogether. +Unfortunately allowing it unconditionally could cause regressions in +various scenarios - such as when using GLX or a driver that doesn't +support sampling NV12. + +Thus introduce a feature - disabled by default for now - to make it easy +to enable these formats. + +Note that on Wayland it might be required to disable overlay delegation +with `--disable-features=WaylandOverlayDelegation`. + +Change-Id: I8ee396de5f6d4958278b0f0bd53bfa9a7007c8c7 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5038617 +Reviewed-by: Ted (Chromium) Meyer +Reviewed-by: Andres Calderon Jaramillo +Commit-Queue: Andres Calderon Jaramillo +Cr-Commit-Position: refs/heads/main@{#1351792} +--- + media/mojo/services/gpu_mojo_media_client_linux.cc | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/media/mojo/services/gpu_mojo_media_client_linux.cc b/media/mojo/services/gpu_mojo_media_client_linux.cc +index c592c2e4c2c2..cd86a3253e07 100644 +--- a/media/mojo/services/gpu_mojo_media_client_linux.cc ++++ b/media/mojo/services/gpu_mojo_media_client_linux.cc +@@ -18,6 +18,10 @@ namespace media { + + namespace { + ++BASE_FEATURE(kVaapiVideoDecodeLinuxZeroCopyGL, ++ "VaapiVideoDecodeLinuxZeroCopyGL", ++ base::FEATURE_DISABLED_BY_DEFAULT); ++ + VideoDecoderType GetPreferredLinuxDecoderImplementation() { + // VaapiVideoDecoder flag is required for VaapiVideoDecoder. + if (!base::FeatureList::IsEnabled(kVaapiVideoDecodeLinux)) { +@@ -50,8 +54,15 @@ std::vector GetPreferredRenderableFourccs( + if (gpu_preferences.gr_context_type == gpu::GrContextType::kVulkan) { + renderable_fourccs.emplace_back(Fourcc::NV12); + renderable_fourccs.emplace_back(Fourcc::P010); +- } ++ } else + #endif // BUILDFLAG(ENABLE_VULKAN) ++ // Allow zero-copy formats with GL for testing or in controlled ++ // environments. ++ if (gpu_preferences.gr_context_type == gpu::GrContextType::kGL && ++ base::FeatureList::IsEnabled(kVaapiVideoDecodeLinuxZeroCopyGL)) { ++ renderable_fourccs.emplace_back(Fourcc::NV12); ++ renderable_fourccs.emplace_back(Fourcc::P010); ++ } + + // Support 1-copy argb textures. + // diff --git a/allow-ANGLEImplementation-kVulkan.patch b/allow-ANGLEImplementation-kVulkan.patch deleted file mode 100644 index a98cf1c9..00000000 --- a/allow-ANGLEImplementation-kVulkan.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 1d408de1538427653f776b5e5e646503d0d0f0c5 Mon Sep 17 00:00:00 2001 -From: Ho Cheung -Date: Fri, 2 Aug 2024 00:10:43 +0000 -Subject: [PATCH] Reland "[ozone+wayland] Allow ANGLEImplementation::kVulkan - when ozone platform is Wayland" - -This reverts commit 49aad997bfc37ab236c4cb593ebc2306960a43f5. - -Reason: This CL has caused failed tests in at -least two tryjobs of Lacros FYI and Linux Tests -(dbg). - -These failed tests seem to be related to the -Vulkan field trial. Now the Vulkan field trial has -been disabled and the related failed tests have -also been suppressed. - -Based on the above, all blockers have been -removed, and we can try to merge this CL again. - -Bug: 334275637,40722838,41392107 -Change-Id: I5fcafff1d3dad431a64c9b429c807c996f6a0d74 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5740783 -Reviewed-by: Kramer Ge -Commit-Queue: Ho Cheung -Reviewed-by: Nick Yamane -Reviewed-by: Vasiliy Telezhnikov -Cr-Commit-Position: refs/heads/main@{#1336353} ---- - ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc b/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc -index 051e26171012..dcb947ae88f4 100644 ---- a/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc -+++ b/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc -@@ -213,6 +213,7 @@ WaylandSurfaceFactory::GetAllowedGLImplementations() { - impls.emplace_back(gl::ANGLEImplementation::kOpenGL); - impls.emplace_back(gl::ANGLEImplementation::kOpenGLES); - impls.emplace_back(gl::ANGLEImplementation::kSwiftShader); -+ impls.emplace_back(gl::ANGLEImplementation::kVulkan); - } - return impls; - } diff --git a/p010-Zero-Copy-for-VA-API-Decoding-for-Vulkan.patch b/p010-Zero-Copy-for-VA-API-Decoding-for-Vulkan.patch new file mode 100644 index 00000000..66df8405 --- /dev/null +++ b/p010-Zero-Copy-for-VA-API-Decoding-for-Vulkan.patch @@ -0,0 +1,73 @@ +From 882f184c471fc8e5c59ead4e4c8eaf06dc7f89da Mon Sep 17 00:00:00 2001 +From: Jianhui Dai +Date: Wed, 4 Sep 2024 01:28:15 +0000 +Subject: [PATCH] vaapi_decoder/linux: P010 Zero-Copy for VA-API Video Decoding + for Vulkan + +This CL adds P010 to the list of renderable formats for Vulkan, enabling +zero-copy video decoding via VA-API. By avoiding the unnecessary +conversion from P010 to NV12, this optimization preserves color depth +and improves overall performance. + +Test on Ubuntu 22.04 for Alder Lake: + Linux Ozone-Wayland Vulkan: +` +chrome --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround +--enable-features=Vulkan,VaapiIgnoreDriverChecks,DefaultANGLEVulkan,VulkanFromANGLE +--use-gl=angle --use-angle=vulkan --ozone-platform=wayland +` + + Linux Ozone-X11 Vulkan: +` +chrome --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround +--enable-features=Vulkan,VaapiIgnoreDriverChecks,DefaultANGLEVulkan,VulkanFromANGLE +--use-gl=angle --use-angle=vulkan --ozone-platform=x11 +` + +HEVC Main 10 10-bit test video: +https://developer.apple.com/videos/play/wwdc2024/10136/ + +Bug: 349428388 +Change-Id: I4a5524d8224982e44a928467bb37a46b8404d402 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5831505 +Reviewed-by: Ted (Chromium) Meyer +Reviewed-by: Andres Calderon Jaramillo +Commit-Queue: Jianhui J Dai +Cr-Commit-Position: refs/heads/main@{#1350537} +--- + .../mojo/services/gpu_mojo_media_client_linux.cc | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/media/mojo/services/gpu_mojo_media_client_linux.cc b/media/mojo/services/gpu_mojo_media_client_linux.cc +index 6c8dcffca050..c592c2e4c2c2 100644 +--- a/media/mojo/services/gpu_mojo_media_client_linux.cc ++++ b/media/mojo/services/gpu_mojo_media_client_linux.cc +@@ -45,20 +45,21 @@ VideoDecoderType GetPreferredLinuxDecoderImplementation() { + std::vector GetPreferredRenderableFourccs( + const gpu::GpuPreferences& gpu_preferences) { + std::vector renderable_fourccs; +- // TODO(crbug.com/349428388): For HEVC Main 10 and VP9 Profile2 10-bit video, +- // the current implementation requires additional VPP to convert the P010 +- // format to a renderable format. This VPP happens on the Vulkan path +- // (P010 -> NV12) and OpenGL path (P010 -> AR24). While this VPP introduces a +- // loss of color depth, it should be optimized for zero-copy path in the +- // future. + #if BUILDFLAG(ENABLE_VULKAN) +- // Support for zero-copy NV12 textures preferentially. ++ // Support for zero-copy NV12/P010 textures preferentially. + if (gpu_preferences.gr_context_type == gpu::GrContextType::kVulkan) { + renderable_fourccs.emplace_back(Fourcc::NV12); ++ renderable_fourccs.emplace_back(Fourcc::P010); + } + #endif // BUILDFLAG(ENABLE_VULKAN) + + // Support 1-copy argb textures. ++ // ++ // TODO(crbug.com/349428388): For VP9 Profile2 and HEVC Main 10 10-bit video, ++ // the current implementation requires additional VPP to convert the NV12/P010 ++ // format to a renderable format AR24. While this VPP introduces a loss of ++ // color depth (P010 -> AR24), it should be optimized for zero-copy path in ++ // the future. + renderable_fourccs.emplace_back(Fourcc::AR24); + + return renderable_fourccs;