Skip to contentSkip to conversation

package/wpewebkit: add backported patch to fix NEON build

PATCH Applied Adrian Perez de Castro 3 participants 4 messages Jun 24, 2024 – Jul 23, 2024

lore
Share & tools
lore
#0 lore raw

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

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.

---
 ...-specific-declarations-in-FELighting.patch | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch
package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch new file +68 -0
new file mode 100644
index 0000000000..9e2bc86fef
@@ -0,0 +1,68 @@
+From 8863ceb3c8486f31e1ccfcd2c7c602fad9feac52 Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <[email protected]>
+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 <[email protected]>
+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
+
Signature · 6 lines
2.45.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 9 lines · On Mon, 24 Jun 2024 23:00:53 +0300 Adrian Perez de Castro <[email protected]>…

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.

---
 ...-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

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hi Peter,

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

Regards,
Michael

Quoted 13 lines · Thomas Petazzoni via buildroot
Quoted 9 lines · On Mon, 24 Jun 2024 23:00:53 +0300 Adrian Perez de Castro <[email protected]>…

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.

---
 ...-specific-declarations-in-FELighting.patch | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.patch
Quoted 11 lines

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Adrian Perez de Castro
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Adrian" == Adrian Perez de Castro <[email protected]> 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.

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot