diff options
author | Sam James <sam@gentoo.org> | 2024-08-27 00:36:27 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-08-27 00:36:27 +0100 |
commit | 895559126b0565a22a085dccf087fa3b4bb2ad61 (patch) | |
tree | 2c05eedb2cc782982cbf5328f2717e0fd8fbf9da /media-gfx/krita | |
parent | net-libs/gtk-vnc: fix naughty typo (diff) | |
download | gentoo-895559126b0565a22a085dccf087fa3b4bb2ad61.tar.gz gentoo-895559126b0565a22a085dccf087fa3b4bb2ad61.tar.bz2 gentoo-895559126b0565a22a085dccf087fa3b4bb2ad61.zip |
media-gfx/krita: fix build w/ -march=znver4 & USE=xsimd
Closes: https://bugs.gentoo.org/936296
Thanks-to: Dmitry Kazakov <dimula73@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/krita')
-rw-r--r-- | media-gfx/krita/files/krita-5.2.3-znver4-xsimd.patch | 38 | ||||
-rw-r--r-- | media-gfx/krita/krita-5.2.3.ebuild | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/media-gfx/krita/files/krita-5.2.3-znver4-xsimd.patch b/media-gfx/krita/files/krita-5.2.3-znver4-xsimd.patch new file mode 100644 index 000000000000..df5fffb41d47 --- /dev/null +++ b/media-gfx/krita/files/krita-5.2.3-znver4-xsimd.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/936296 +https://invent.kde.org/graphics/krita/-/commit/cf2c74220b7edfae53a0715346cb4e2c7dfc38ae + +From cf2c74220b7edfae53a0715346cb4e2c7dfc38ae Mon Sep 17 00:00:00 2001 +From: Dmitry Kazakov <dimula73@gmail.com> +Date: Mon, 26 Aug 2024 14:38:03 +0200 +Subject: [PATCH] Don't use xsimd::default_arch in the pixel scaler code + +Gentoo seems to build Krita with a global -march=znver4 flag, +which causes "scalar" version of the code to be compiled with +AVX512. Even though it is not how the system is supposed to work +(and this avx512-optimization will never be used in real runtime), +we shouldn't fail compilation. + +https://bugs.gentoo.org/936296 +https://github.com/xtensor-stack/xsimd/issues/1044 +--- a/libs/pigment/KoOptimizedPixelDataScalerU8ToU16.h ++++ b/libs/pigment/KoOptimizedPixelDataScalerU8ToU16.h +@@ -28,7 +28,7 @@ public: + const int numColorChannels = m_channelsPerPixel * numColumns; + + #if defined(HAVE_XSIMD) && XSIMD_WITH_AVX2 +- using uint16_avx_v = xsimd::batch<uint16_t, xsimd::default_arch>; ++ using uint16_avx_v = xsimd::batch<uint16_t, xsimd::avx2>; + using uint16_v = xsimd::batch<uint16_t, xsimd::sse4_1>; + using uint8_v = xsimd::batch<uint8_t, xsimd::sse4_1>; + +@@ -129,7 +129,7 @@ public: + const int numColorChannels = m_channelsPerPixel * numColumns; + + #if defined(HAVE_XSIMD) && XSIMD_WITH_AVX2 +- using uint16_avx_v = xsimd::batch<uint16_t, xsimd::default_arch>; ++ using uint16_avx_v = xsimd::batch<uint16_t, xsimd::avx2>; + using uint16_v = xsimd::batch<uint16_t, xsimd::sse4_1>; + + const int channelsPerAvx2Block = 32; +-- +GitLab diff --git a/media-gfx/krita/krita-5.2.3.ebuild b/media-gfx/krita/krita-5.2.3.ebuild index c95734e0ad9a..e6485a056c75 100644 --- a/media-gfx/krita/krita-5.2.3.ebuild +++ b/media-gfx/krita/krita-5.2.3.ebuild @@ -98,6 +98,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.2.2-fftw.patch # bug 913518 # git master "${FILESDIR}"/${PN}-5.1.5-sip-6.8.patch # bug 919139 + "${FILESDIR}"/${PN}-5.2.3-znver4-xsimd.patch # bug 936296 ) pkg_setup() { |