Commit c4428e2a authored by Dmitry Kazakov's avatar Dmitry Kazakov Committed by Halla Rempt
Browse files

Disable AVX optimizations for 32-bit composite ops

They cause artifacts and we don't have a fix yet :(


Note from the committer:
This commit was initially made on krita/4.2 branch.
However between 4.2.1 and 4.2.2 the stable branch was
reconstructed, which caused all commits that were exclusively
on the previous krita/4.2 (and not on master) to be missing.

The previous commit hash: d3e4c3aa

Also regarding the artifacts: it never worked, optimization were
enabled during the creamy flow implementation, but they never should
be enabled until someone fix them properly.
parent dbf3fd7a
...@@ -94,9 +94,20 @@ template<> ...@@ -94,9 +94,20 @@ template<>
struct OptimizedOpsSelector<KoRgbF32Traits> struct OptimizedOpsSelector<KoRgbF32Traits>
{ {
static KoCompositeOp* createAlphaDarkenOp(const KoColorSpace *cs) { static KoCompositeOp* createAlphaDarkenOp(const KoColorSpace *cs) {
return useCreamyAlphaDarken() ?
KoOptimizedCompositeOpFactory::createAlphaDarkenOpCreamy128(cs) : // TODO: optimized code is disabled for 4.2 release,
KoOptimizedCompositeOpFactory::createAlphaDarkenOpHard128(cs); // becasue it causes bug
if (useCreamyAlphaDarken()) {
return new KoCompositeOpAlphaDarken<KoRgbF32Traits, KoAlphaDarkenParamsWrapperCreamy>(cs);
} else {
return new KoCompositeOpAlphaDarken<KoRgbF32Traits, KoAlphaDarkenParamsWrapperHard>(cs);
// TODO: please restore this optimized version when the bug is fixed
// return useCreamyAlphaDarken() ?
// KoOptimizedCompositeOpFactory::createAlphaDarkenOpCreamy128(cs) :
// KoOptimizedCompositeOpFactory::createAlphaDarkenOpHard128(cs);
} }
static KoCompositeOp* createOverOp(const KoColorSpace *cs) { static KoCompositeOp* createOverOp(const KoColorSpace *cs) {
return KoOptimizedCompositeOpFactory::createOverOp128(cs); return KoOptimizedCompositeOpFactory::createOverOp128(cs);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment