diff mbox series

[1/1] package/wpewebkit: add backported patch to fix NEON build

Message ID 20240624200056.440154-1-aperez@igalia.com
State Accepted
Headers show
Series [1/1] package/wpewebkit: add backported patch to fix NEON build | expand

Commit Message

Adrian Perez de Castro June 24, 2024, 8 p.m. UTC
Import a patch that has been backported by upstream to the 2.44 release
branch that fixes the build when the target is an ARM processor that
supports NEON instructions.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 ...-specific-declarations-in-FELighting.patch | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch

Comments

Thomas Petazzoni July 10, 2024, 12:30 p.m. UTC | #1
On Mon, 24 Jun 2024 23:00:53 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:

> Import a patch that has been backported by upstream to the 2.44 release
> branch that fixes the build when the target is an ARM processor that
> supports NEON instructions.
> 
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
>  ...-specific-declarations-in-FELighting.patch | 68 +++++++++++++++++++
>  1 file changed, 68 insertions(+)
>  create mode 100644 package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch

Applied to master, thanks.

Thomas
Michael Nosthoff July 15, 2024, 8:28 a.m. UTC | #2
Hi Peter,

this patch should also go into the 2024.05.x branch as the issue is also present there.

Regards,
Michael

On Wednesday, July 10, 2024 14:30 CEST, Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> On Mon, 24 Jun 2024 23:00:53 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
> 
> > Import a patch that has been backported by upstream to the 2.44 release
> > branch that fixes the build when the target is an ARM processor that
> > supports NEON instructions.
> > 
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> >  ...-specific-declarations-in-FELighting.patch | 68 +++++++++++++++++++
> >  1 file changed, 68 insertions(+)
> >  create mode 100644 package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch
> 
> Applied to master, thanks.
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Peter Korsgaard July 23, 2024, 2:43 p.m. UTC | #3
>>>>> "Adrian" == Adrian Perez de Castro <aperez@igalia.com> writes:

 > Import a patch that has been backported by upstream to the 2.44 release
 > branch that fixes the build when the target is an ARM processor that
 > supports NEON instructions.

 > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>

Committed to 2024.02.x and 2024.05.x, thanks.
diff mbox series

Patch

diff --git a/package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch b/package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch
new file mode 100644
index 0000000000..9e2bc86fef
--- /dev/null
+++ b/package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch
@@ -0,0 +1,68 @@ 
+From 8863ceb3c8486f31e1ccfcd2c7c602fad9feac52 Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Mon, 27 May 2024 02:09:58 +0300
+Subject: [PATCH] Cherry-pick 279334@main (36d1b5d7c0ef). <bug>
+
+    Remove ARM-specific declarations in FELighting.h unneeded after 272873@main
+
+    Unreviewed build fix.
+
+    * Source/WebCore/platform/graphics/filters/FELighting.h: Remove unneeded
+      declarations for the getPowerCoefficients() and platformApplyNeon()
+      functions, which are now defined elsewhere; and were causing a build
+      failure due to usage of the protected LightingData type.
+    * Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp:
+      (WebCore::FELightingNeonParallelApplier::applyPlatformParallel const):
+      Add missing LightType:: namespace to uses of LS_POINT and LS_SPOT.
+
+    Canonical link: https://commits.webkit.org/279334@main
+
+Canonical link: https://commits.webkit.org/274313.261@webkitglib/2.44
+
+Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
+Upstream: https://github.com/WebKit/WebKit/commit/8863ceb3c8486f31e1ccfcd2c7c602fad9feac52
+---
+ .../cpu/arm/filters/FELightingNeonParallelApplier.cpp        | 4 ++--
+ Source/WebCore/platform/graphics/filters/FELighting.h        | 5 -----
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp
+index 04d855fa6d71..5f4250d87b61 100644
+--- a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp
++++ b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp
+@@ -542,14 +542,14 @@ void FELightingNeonParallelApplier::applyPlatformParallel(const LightingData& da
+     floatArguments.colorBlue = color.blue;
+     floatArguments.padding4 = 0;
+ 
+-    if (data.lightSource->type() == LS_POINT) {
++    if (data.lightSource->type() == LightType::LS_POINT) {
+         neonData.flags |= FLAG_POINT_LIGHT;
+         auto& pointLightSource = downcast<PointLightSource>(*data.lightSource);
+         floatArguments.lightX = pointLightSource.position().x();
+         floatArguments.lightY = pointLightSource.position().y();
+         floatArguments.lightZ = pointLightSource.position().z();
+         floatArguments.padding2 = 0;
+-    } else if (data.lightSource->type() == LS_SPOT) {
++    } else if (data.lightSource->type() == LightType::LS_SPOT) {
+         neonData.flags |= FLAG_SPOT_LIGHT;
+         auto& spotLightSource = downcast<SpotLightSource>(*data.lightSource);
+         floatArguments.lightX = spotLightSource.position().x();
+diff --git a/Source/WebCore/platform/graphics/filters/FELighting.h b/Source/WebCore/platform/graphics/filters/FELighting.h
+index 4efab920b1c3..dcd80b6f42b7 100644
+--- a/Source/WebCore/platform/graphics/filters/FELighting.h
++++ b/Source/WebCore/platform/graphics/filters/FELighting.h
+@@ -68,11 +68,6 @@ protected:
+ 
+     std::unique_ptr<FilterEffectApplier> createSoftwareApplier() const override;
+ 
+-#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE)
+-    static int getPowerCoefficients(float exponent);
+-    inline void platformApplyNeon(const LightingData&, const LightSource::PaintingData&);
+-#endif
+-
+     Color m_lightingColor;
+     float m_surfaceScale;
+     float m_diffuseConstant;
+-- 
+2.45.2
+