https://bugs.kde.org/show_bug.cgi?id=458033

amyspark <a...@amyspark.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDSINFO                   |RESOLVED
         Resolution|WAITINGFORINFO              |NOT A BUG

--- Comment #7 from amyspark <a...@amyspark.me> ---
(In reply to Timo Gurr from comment #4)
> (In reply to amyspark from comment #2)
> > Can you check what your compiler returns for the size of `unsigned int`?
> Sorry I've no  idea how to do that.
> 
> > Alternatively, can you replace the definitions in
> > libs\pigment\compositeops\KoStreamedMath.h as follows, and try building
> > Krita again? Replace "int" and "unsigned int" for "int32_t" and "uint32_t"
> > respectively, in`struct PixelWrapper<quint16, ...>` and `struct
> > PixelWrapper<float, ...>`.
> 
> I'm attaching the patch I'm using as krita-5.1.0-xsimd.patch, maybe I did
> something wrong, with it applied I get the following error:
> 
> /var/tmp/paludis/build/media-gfx-krita-5.1.0/work/krita-5.1.0/libs/pigment/
> compositeops/KoRgbaInterleavers.h:176:37: error: no matching function for
> call to 'KoRgbaInterleavers<16>::deinterleave<false>(const void*&,
> xsimd::batch<unsigned int, xsimd::avx>&, xsimd::batch<unsigned int,
> xsimd::avx>&, xsimd::avx)'
>   176 |         return deinterleave<aligned>(src, a, b, A{});
>       |                ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
> /var/tmp/paludis/build/media-gfx-krita-5.1.0/work/krita-5.1.0/libs/pigment/
> compositeops/KoRgbaInterleavers.h:131:24: note: candidate: 'template<bool
> aligned, class T, class A, typename
> std::enable_if<(std::is_integral<_Size>::value && (sizeof (T) == 4)),
> int>::type <anonymous>, typename std::enable_if<(xsimd::batch<T, A>::size ==
> 4), int>::type <anonymous> > static void
> KoRgbaInterleavers<16>::deinterleave(const void*, xsimd::batch<T, A>&,
> xsimd::batch<T, A>&, xsimd::kernel::requires_arch<xsimd::generic>)'
>   131 |     static inline void deinterleave(const void *src, batch<T, A>
> &dst1, batch<T, A> &dst2, kernel::requires_arch<generic>)
>       |                        ^~~~~~~~~~~~
> /var/tmp/paludis/build/media-gfx-krita-5.1.0/work/krita-5.1.0/libs/pigment/
> compositeops/KoRgbaInterleavers.h:131:24: note:   template argument
> deduction/substitution failed:
> /var/tmp/paludis/build/media-gfx-krita-5.1.0/work/krita-5.1.0/libs/pigment/
> compositeops/KoRgbaInterleavers.h:130:120: error: no type named 'type' in
> 'struct std::enable_if<false, int>'
>   130 |     template<bool aligned, typename T, typename A,
> enable_sized_integral_t<T, 4> = 0, enable_sized_vector_t<T, A, 4> = 0>
>       |                                                                     
> ^
> /var/tmp/paludis/build/media-gfx-krita-5.1.0/work/krita-5.1.0/libs/pigment/
> compositeops/KoRgbaInterleavers.h:146:24: note: candidate: 'template<bool
> aligned, class T, class A, typename std::enable_if<(sizeof (T) == 4),
> int>::type <anonymous> > static void
> KoRgbaInterleavers<16>::deinterleave(const void*, xsimd::batch<T, A>&,
> xsimd::batch<T, A>&, xsimd::kernel::requires_arch<xsimd::avx2>)'
>   146 |     static inline void deinterleave(const void *src, batch<T, A> &a,
> batch<T, A> &b, kernel::requires_arch<avx2>)
>       |                        ^~~~~~~~~~~~
> /var/tmp/paludis/build/media-gfx-krita-5.1.0/work/krita-5.1.0/libs/pigment/
> compositeops/KoRgbaInterleavers.h:146:24: note:   template argument
> deduction/substitution failed:
> /var/tmp/paludis/build/media-gfx-krita-5.1.0/work/krita-5.1.0/libs/pigment/
> compositeops/KoRgbaInterleavers.h:176:37: note:   cannot convert
> 'xsimd::avx()' (type 'xsimd::avx') to type
> 'xsimd::kernel::requires_arch<xsimd::avx2>' {aka 'const xsimd::avx2&'}
>   176 |         return deinterleave<aligned>(src, a, b, A{});
>       |                ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

I'm afraid your compiler is definitely reporting the wrong size for 32-bit
unsigned integers (not 4 bytes), hence the generic version won't be usable.
There's nothing we can do on our end, you'll have to upgrade GCC or build Krita
without SIMD acceleration.

For this reason, marking as NOT A BUG.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to