Commit 8e980601 authored by Boudewijn Rempt's avatar Boudewijn Rempt

try to disable vc from composite ops

parent 175803dc
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
/* Define if you have Vc, the vectorization library */ /* Define if you have Vc, the vectorization library */
#cmakedefine HAVE_VC 1 #cmakedefine HAVE_VC 1
#ifndef Q_CC_MSVC
#cmakedefine HAVE_SANE_VC 1
#endif
...@@ -11,11 +11,11 @@ if(OPENEXR_FOUND) ...@@ -11,11 +11,11 @@ if(OPENEXR_FOUND)
endif(OPENEXR_FOUND) endif(OPENEXR_FOUND)
set(LINK_VC_LIB) set(LINK_VC_LIB)
if(HAVE_VC) if(HAVE_SANE_VC)
include_directories(${Vc_INCLUDE_DIR}) include_directories(${Vc_INCLUDE_DIR})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}")
set(LINK_VC_LIB ${Vc_LIBRARIES}) set(LINK_VC_LIB ${Vc_LIBRARIES})
endif(HAVE_VC) endif(HAVE_SANE_VC)
add_subdirectory(tests) add_subdirectory(tests)
add_subdirectory(benchmarks) add_subdirectory(benchmarks)
......
...@@ -39,10 +39,10 @@ struct AlphaDarkenCompositor32 { ...@@ -39,10 +39,10 @@ struct AlphaDarkenCompositor32 {
* \p src_aligned. * \p src_aligned.
* o the \p dst pointer must always(!) be aligned to the boundary * o the \p dst pointer must always(!) be aligned to the boundary
* of a streaming vector. Unaligned writes are really expensive. * of a streaming vector. Unaligned writes are really expensive.
* o This function is *never* used if HAVE_VC is not present * o This function is *never* used if HAVE_SANE_VC is not present
*/ */
#ifdef HAVE_VC #ifdef HAVE_SANE_VC
template<bool haveMask, bool src_aligned> template<bool haveMask, bool src_aligned>
static ALWAYS_INLINE void compositeVector(const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, float flow) static ALWAYS_INLINE void compositeVector(const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, float flow)
...@@ -139,7 +139,7 @@ struct AlphaDarkenCompositor32 { ...@@ -139,7 +139,7 @@ struct AlphaDarkenCompositor32 {
KoStreamedMath::write_channels_32(dst, dst_alpha, dst_c1, dst_c2, dst_c3); KoStreamedMath::write_channels_32(dst, dst_alpha, dst_c1, dst_c2, dst_c3);
} }
#endif /* HAVE_VC */ #endif /* HAVE_SANE_VC */
/** /**
* Composes one pixel of the source into the destination * Composes one pixel of the source into the destination
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "config-vc.h" #include "config-vc.h"
#ifdef HAVE_VC #ifdef HAVE_SANE_VC
#include <Vc/global.h> #include <Vc/global.h>
#include <Vc/common/support.h> #include <Vc/common/support.h>
#endif #endif
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
KoCompositeOp* KoOptimizedCompositeOpFactory::createAlphaDarkenOp32(const KoColorSpace *cs) KoCompositeOp* KoOptimizedCompositeOpFactory::createAlphaDarkenOp32(const KoColorSpace *cs)
{ {
#if defined HAVE_VC #if defined HAVE_SANE_VC
if (Vc::currentImplementationSupported()) { if (Vc::currentImplementationSupported()) {
return new KoOptimizedCompositeOpAlphaDarken32(cs); return new KoOptimizedCompositeOpAlphaDarken32(cs);
} }
...@@ -50,7 +50,7 @@ KoCompositeOp* KoOptimizedCompositeOpFactory::createAlphaDarkenOp32(const KoColo ...@@ -50,7 +50,7 @@ KoCompositeOp* KoOptimizedCompositeOpFactory::createAlphaDarkenOp32(const KoColo
KoCompositeOp* KoOptimizedCompositeOpFactory::createOverOp32(const KoColorSpace *cs) KoCompositeOp* KoOptimizedCompositeOpFactory::createOverOp32(const KoColorSpace *cs)
{ {
#if defined HAVE_VC #if defined HAVE_SANE_VC
if (Vc::currentImplementationSupported()) { if (Vc::currentImplementationSupported()) {
return new KoOptimizedCompositeOpOver32(cs); return new KoOptimizedCompositeOpOver32(cs);
} }
......
...@@ -31,7 +31,7 @@ template<typename channels_type, typename pixel_type, bool alphaLocked, bool all ...@@ -31,7 +31,7 @@ template<typename channels_type, typename pixel_type, bool alphaLocked, bool all
struct OverCompositor32 { struct OverCompositor32 {
// \see docs in AlphaDarkenCompositor32 // \see docs in AlphaDarkenCompositor32
#ifdef HAVE_VC #ifdef HAVE_SANE_VC
template<bool haveMask, bool src_aligned> template<bool haveMask, bool src_aligned>
static ALWAYS_INLINE void compositeVector(const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, float flow) static ALWAYS_INLINE void compositeVector(const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, float flow)
...@@ -119,7 +119,7 @@ struct OverCompositor32 { ...@@ -119,7 +119,7 @@ struct OverCompositor32 {
KoStreamedMath::write_channels_32(dst, new_alpha, dst_c1, dst_c2, dst_c3); KoStreamedMath::write_channels_32(dst, new_alpha, dst_c1, dst_c2, dst_c3);
} }
#endif /* HAVE_VC */ #endif /* HAVE_SANE_VC */
template <bool haveMask> template <bool haveMask>
static ALWAYS_INLINE void compositeOnePixelScalar(const channels_type *src, channels_type *dst, const quint8 *mask, float opacity, float flow, const QBitArray &channelFlags) static ALWAYS_INLINE void compositeOnePixelScalar(const channels_type *src, channels_type *dst, const quint8 *mask, float opacity, float flow, const QBitArray &channelFlags)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "config-vc.h" #include "config-vc.h"
#ifdef HAVE_VC #ifdef HAVE_SANE_VC
#include <Vc/Vc> #include <Vc/Vc>
#include <Vc/IO> #include <Vc/IO>
#endif #endif
...@@ -86,7 +86,7 @@ static inline quint8 lerp_mixed_u8_float(quint8 a, quint8 b, float alpha) { ...@@ -86,7 +86,7 @@ static inline quint8 lerp_mixed_u8_float(quint8 a, quint8 b, float alpha) {
return quint8(qint16(b - a) * alpha + a); return quint8(qint16(b - a) * alpha + a);
} }
#if defined HAVE_VC #if defined HAVE_SANE_VC
/** /**
* Get a vector containing first Vc::float_v::Size values of mask. * Get a vector containing first Vc::float_v::Size values of mask.
...@@ -304,7 +304,7 @@ template<bool useMask, bool useFlow, class Compositor> ...@@ -304,7 +304,7 @@ template<bool useMask, bool useFlow, class Compositor>
} }
} }
#else /* if ! defined HAVE_VC */ #else /* if ! defined HAVE_SANE_VC */
/** /**
* Fall back to the scalar version of the composition. * Fall back to the scalar version of the composition.
...@@ -320,7 +320,7 @@ template<bool useMask, bool useFlow, class Compositor> ...@@ -320,7 +320,7 @@ template<bool useMask, bool useFlow, class Compositor>
genericComposite32_novector<useMask, useFlow, Compositor>(params); genericComposite32_novector<useMask, useFlow, Compositor>(params);
} }
#endif /* HAVE_VC */ #endif /* HAVE_SANE_VC */
} }
......
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