From ecd49f45520dd92a05ed29e06f2d688110252a22 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Mon, 24 Jun 2024 23:00:53 +0300 Subject: [PATCH] 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. Signed-off-by: Adrian Perez de Castro Signed-off-by: Thomas Petazzoni (cherry picked from commit 8502ac71aad426792aa51923ef0f14b83c4bf2c7) Signed-off-by: Peter Korsgaard --- ...-specific-declarations-in-FELighting.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 package/wpewebkit/0001-Remove-ARM-specific-declarations-in-FELighting.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 +Date: Mon, 27 May 2024 02:09:58 +0300 +Subject: [PATCH] Cherry-pick 279334@main (36d1b5d7c0ef). + + 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 +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(*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(*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 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 +