Bug 463219 - Color depths other than 8-bit cause artifacts
Summary: Color depths other than 8-bit cause artifacts
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color models (show other bugs)
Version: 5.1.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-19 03:01 UTC by rkolbaskin
Modified: 2022-12-23 16:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Artifacts in 16-bit integer and 32-bit float modes (558.77 KB, image/png)
2022-12-19 03:01 UTC, rkolbaskin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rkolbaskin 2022-12-19 03:01:57 UTC
Created attachment 154686 [details]
Artifacts in 16-bit integer and 32-bit float modes

SUMMARY
When color depth is anything other than 8-bit it causes graphical artifacts. 16-bit integer color will have some vertical lines swapped, float modes break completely.
Artifacts in newly drawn patches will persist when reopened in 5.1.3.
Switching to software rendering doesn't help.

This doesn't happen in 5.1.3.

STEPS TO REPRODUCE
1. Create a new image with color depth other than 8-bit.
2. Try to draw anything.

OBSERVED RESULT
See attachment. First three is 16-bit integer mode where I first noticed it. Last one is what happens in float modes.

EXPECTED RESULT
No artifacts.

SOFTWARE/OS VERSIONS
Linux: 6.0.12
KDE Plasma Version: 2.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Comment 1 Halla Rempt 2022-12-19 10:03:42 UTC
Amyspark, could this have to do with the lcms2 update?
Comment 2 rkolbaskin 2022-12-19 12:06:29 UTC
Following suggestion on krita-artists forum to someone with similar looking issue, I installed Flatpak version of Krita 5. Indeed, it doesn't have artifacts.
I will try compiling from sources next.
Comment 3 rkolbaskin 2022-12-19 13:10:02 UTC
Bug appears only if I compile with "find-xsimd.patch" patch that is applied to Arch Linux repo version.
https://github.com/archlinux/svntogit-packages/blob/packages/krita/trunk/find-xsimd.patch
Comment 4 Halla Rempt 2022-12-19 13:14:41 UTC
Can you also reproduce with the appimage?
Comment 5 rkolbaskin 2022-12-19 14:02:59 UTC
(In reply to Halla Rempt from comment #4)
> Can you also reproduce with the appimage?

Appimage version doesn't have this bug as well.

It seems to be some kind of incompatibility with xsimd 10.0 or maybe a bug in xsimd since it only surfaces because Arch repo version forces it to use this version. Source accepts xsimd only up to 9.0.
Comment 6 amyspark 2022-12-23 16:44:47 UTC
Git commit 61cf80d57a103aa8ec8ffe2b7c369c5f61def890 by L. E. Segovia.
Committed on 23/12/2022 at 16:40.
Pushed by lsegovia into branch 'master'.

xsimd: Avoid using zip_* in xsimd >= 10

xsimd 10 introduces an undocumented, breaking change in the batch
zipping semantics. These are relied on in the RGBA interleavers,
when they replaced the old gather/scatter implementation.

To work around them, the old implementation was brought back,
surrounded with suitable guards, and the corresponding error pragma
was added to KoRgbaInterleavers.h.

M  +4    -0    libs/pigment/compositeops/KoRgbaInterleavers.h
M  +52   -0    libs/pigment/compositeops/KoStreamedMath.h

https://invent.kde.org/graphics/krita/commit/61cf80d57a103aa8ec8ffe2b7c369c5f61def890
Comment 7 amyspark 2022-12-23 16:45:18 UTC
Git commit b388330bdb8915af0fa1b1bac1bf473507a8c045 by L. E. Segovia.
Committed on 23/12/2022 at 16:44.
Pushed by lsegovia into branch 'krita/5.1'.

xsimd: Avoid using zip_* in xsimd >= 10

xsimd 10 introduces an undocumented, breaking change in the batch
zipping semantics. These are relied on in the RGBA interleavers,
when they replaced the old gather/scatter implementation.

To work around them, the old implementation was brought back,
surrounded with suitable guards, and the corresponding error pragma
was added to KoRgbaInterleavers.h.
(cherry picked from commit 61cf80d57a103aa8ec8ffe2b7c369c5f61def890)

M  +4    -0    libs/pigment/compositeops/KoRgbaInterleavers.h
M  +52   -0    libs/pigment/compositeops/KoStreamedMath.h

https://invent.kde.org/graphics/krita/commit/b388330bdb8915af0fa1b1bac1bf473507a8c045