public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kquickimageeditor] rawhide: Fix build failure on arm64
@ 2026-09-02 11:00 Steve Cossette
0 siblings, 0 replies; only message in thread
From: Steve Cossette @ 2026-09-02 11:00 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/kquickimageeditor
Branch : rawhide
Commit : 5460730e5b7e56805fd1f03168139a69d5d8cdcf
Author : Steve Cossette <farchord@gmail.com>
Date : 2026-09-02T07:00:30-04:00
Stats : +110/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/kquickimageeditor/c/5460730e5b7e56805fd1f03168139a69d5d8cdcf?branch=rawhide
Log:
Fix build failure on arm64
---
diff --git a/68.patch b/68.patch
new file mode 100644
index 0000000..7e0bfdf
--- /dev/null
+++ b/68.patch
@@ -0,0 +1,99 @@
+From ac7568044defc89c494b0d6edb60073cb0ad8b25 Mon Sep 17 00:00:00 2001
+From: Noah Davis <noahadvs@gmail.com>
+Date: Tue, 1 Sep 2026 12:45:18 -0400
+Subject: [PATCH] Fix build on ARM with SVE
+
+Can't put SIMD vectors in a struct/class or any container type on ARM with SVE since the SIMD vector sizes are only known at runtime.
+---
+ src/annotations/stackblur.cpp | 29 ++++++++++++++++-------------
+ 1 file changed, 16 insertions(+), 13 deletions(-)
+
+diff --git a/src/annotations/stackblur.cpp b/src/annotations/stackblur.cpp
+index ae4d750..af56c62 100644
+--- a/src/annotations/stackblur.cpp
++++ b/src/annotations/stackblur.cpp
+@@ -350,7 +350,6 @@ HWY_ATTR HWY_FLATTEN void blurRowWorker(const BlurTask &task)
+ // Vectors are what actually hold data, but they don't have any members.
+ // They don't even have a size until you zero them or assign something.
+ // You have to use Highway's APIs to do anything with them.
+- using MVec = hn::Vec<MTag>; // math vector type
+
+ // Tags don't have data, Highway just uses them to pass type info.
+ MTag mtag;
+@@ -374,19 +373,22 @@ HWY_ATTR HWY_FLATTEN void blurRowWorker(const BlurTask &task)
+ // do this to multiply it with another vector.
+ const auto vMultiplier = hn::Set(mtag, radiusMultiplier<M_t>(radius));
+
++ // Can't put SIMD vectors in a struct/class or any container type on ARM
++ // with SVE since the SIMD vector sizes are only known at runtime.
++
+ // Weights should be set like {1, 2, 3, …, radius+1, …, 3, 2, 1}
+- hwy::AlignedVector<MVec> weights(kernelSize);
++ hwy::AlignedVector<M_t> weights(kernelSize);
+ // set left side of kernel weights
+ for (Px i = 0; i < leftEndMidStart; ++i) {
+- weights[i] = hn::Set(mtag, i + 1);
++ weights[i] = i + 1;
+ }
+ // set middle and right side of kernel weights
+ for (Px i = leftEndMidStart; i < kernelSize; ++i) {
+- weights[i] = hn::Set(mtag, kernelSize - i);
++ weights[i] = kernelSize - i;
+ }
+
+- // A queue of pixel data used by the kernel
+- hwy::AlignedVector<MVec> stack(kernelSize);
++ // A queue of channel data used by the kernel
++ hwy::AlignedVector<M_t> stack(kernelSize * channels);
+
+ for (Px y = task.startRow; y < task.endRow; ++y) {
+ // Inform the compiler if the pointer is aligned and restricted
+@@ -408,18 +410,18 @@ HWY_ATTR HWY_FLATTEN void blurRowWorker(const BlurTask &task)
+
+ // fill up left side of kernel
+ for (Px i = 0; i < leftEndMidStart; ++i) {
+- stack[i] = vFirst;
++ std::copy_n(&rowData[0], channels, &stack[i * channels]);
+ // MulAdd multiplies the first two args, then adds the last.
+ // Sometimes it's more optimal than Add(Mul(v0, v1), v2).
+- stackSum = hn::MulAdd(vFirst, weights[i], stackSum);
++ stackSum = hn::MulAdd(vFirst, hn::Set(mtag, weights[i]), stackSum);
+ sumOut = hn::Add(sumOut, vFirst);
+ }
+ // fill up middle and right side of kernel
+ for (Px i = leftEndMidStart; i < kernelSize; ++i) {
+ const Px nextX = std::min(i - radius, lastX); // starts at 1
+ const auto vNext = loadPtrToVec<alignment>(ctag, itag, mtag, &rowData[nextX * channels]);
+- stack[i] = vNext;
+- stackSum = hn::MulAdd(vNext, weights[i], stackSum);
++ std::copy_n(&rowData[nextX * channels], channels, &stack[i * channels]);
++ stackSum = hn::MulAdd(vNext, hn::Set(mtag, weights[i]), stackSum);
+ sumIn = hn::Add(sumIn, vNext);
+ }
+
+@@ -441,7 +443,7 @@ HWY_ATTR HWY_FLATTEN void blurRowWorker(const BlurTask &task)
+ // Outgoing data kernel index.
+ // The modulo lets us loop through the kernel.
+ const Px outKI = (kernelMidX - radius + kernelSize) % kernelSize;
+- sumOut = hn::Sub(sumOut, stack[outKI]);
++ sumOut = hn::Sub(sumOut, hn::Load(mtag, &stack[outKI * channels]));
+ // Next middle of kernel
+ if constexpr (Section == LeftEdge) {
+ kernelMidX = std::min(kernelMidX + 1, lastX);
+@@ -449,10 +451,11 @@ HWY_ATTR HWY_FLATTEN void blurRowWorker(const BlurTask &task)
+ ++kernelMidX;
+ }
+ const auto vNextKMid = loadPtrToVec<alignment>(ctag, itag, mtag, &row[kernelMidX * channels]);
+- stack[outKI] = vNextKMid; // outgoing is replaced by next
++ // outgoing is replaced by next
++ std::copy_n(&row[kernelMidX * channels], channels, &stack[outKI * channels]);
+ sumIn = hn::Add(sumIn, vNextKMid);
+ stackSum = hn::Add(stackSum, sumIn);
+- const auto vCurrentKMid = stack[kernelMidX % kernelSize];
++ const auto vCurrentKMid = hn::Load(mtag, &stack[(kernelMidX % kernelSize) * channels]);
+ sumOut = hn::Add(sumOut, vCurrentKMid);
+ sumIn = hn::Sub(sumIn, vCurrentKMid);
+ }
+--
+GitLab
+
diff --git a/kquickimageeditor.spec b/kquickimageeditor.spec
index e0f5e32..3e5dfde 100644
--- a/kquickimageeditor.spec
+++ b/kquickimageeditor.spec
@@ -1,11 +1,17 @@
Name: kquickimageeditor
Version: 0.7.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: QtQuick components providing basic image editing capabilities
License: BSD-2-Clause AND CC0-1.0 AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only
URL: https://invent.kde.org/libraries/%{name}
Source0: https://download.kde.org/stable/%{name}/%{name}-%{version}.tar.xz
+# UPSTREAM
+
+# Fix build on ARM with SVE
+# https://invent.kde.org/libraries/kquickimageeditor/-/merge_requests/68
+Patch0: 68.patch
+
BuildRequires: extra-cmake-modules
BuildRequires: kf6-rpm-macros
@@ -36,7 +42,7 @@ The %{name}-qt6-devel package contains cmake and mkspecs for developing
applications that use %{name}-qt6.
%prep
-%autosetup -n %{name}-%{version}
+%autosetup -n %{name}-%{version} -p1
%build
%cmake_kf6
@@ -58,6 +64,9 @@ applications that use %{name}-qt6.
%{_kf6_archdatadir}/mkspecs/modules/qt_KQuickImageEditor.pri
%changelog
+* Wed Sep 02 2026 Steve Cossette <farchord@gmail.com> - 0.7.0-2
+- Add fix to build on aarch64
+
* Tue Sep 01 2026 Steve Cossette <farchord@gmail.com> - 0.7.0-1
- 0.7.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-02 11:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02 11:00 [rpms/kquickimageeditor] rawhide: Fix build failure on arm64 Steve Cossette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox