forked from enlightenment/efl
isolate sse3 to only its own file, so it only uses -msse3 for that
SVN revision: 63762
This commit is contained in:
parent
a57395a623
commit
2aed2cf20a
|
@ -1225,7 +1225,7 @@ AC_ARG_ENABLE(cpu-sse,
|
||||||
build_cpu_sse3="no"
|
build_cpu_sse3="no"
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
i*86)
|
i*86)
|
||||||
build_cpu_sse3="no"
|
build_cpu_sse3="yes"
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
build_cpu_sse3="yes"
|
build_cpu_sse3="yes"
|
||||||
|
@ -1269,12 +1269,14 @@ AC_ARG_ENABLE(cpu-sse3,
|
||||||
# you compile with -msse3. this ALSO tries to optimize REGULAR c code
|
# you compile with -msse3. this ALSO tries to optimize REGULAR c code
|
||||||
# with sse3 asm.. and this breaks things so badly. so... sse3 will be
|
# with sse3 asm.. and this breaks things so badly. so... sse3 will be
|
||||||
# off until further notice for 32bit x86.
|
# off until further notice for 32bit x86.
|
||||||
EVAS_SSE3_CFLAGS="-msse3 "
|
EVAS_SSE3_CFLAGS=" "
|
||||||
if test "x$build_cpu_sse3" = "xyes" ; then
|
if test "x$build_cpu_sse3" = "xyes" ; then
|
||||||
CFLAGS="${CFLAGS} ${EVAS_SSE3_CFLAGS}"
|
EVAS_SSE3_CFLAGS="-msse3 "
|
||||||
|
# CFLAGS="${CFLAGS} ${EVAS_SSE3_CFLAGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
|
AC_SUBST(EVAS_SSE3_CFLAGS)
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
## ALTIVEC
|
## ALTIVEC
|
||||||
|
|
|
@ -113,3 +113,6 @@ evas_map_image_loop.c
|
||||||
|
|
||||||
libevas_engine_common_la_DEPENDENCIES = \
|
libevas_engine_common_la_DEPENDENCIES = \
|
||||||
$(top_builddir)/config.h
|
$(top_builddir)/config.h
|
||||||
|
|
||||||
|
libevas_engine_common_la_LIBADD = \
|
||||||
|
evas_op_blend/libevas_engine_common_op_blend_master_sse3.la
|
||||||
|
|
|
@ -64,13 +64,13 @@ evas_common_cpu_sse_test(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void evas_common_op_sse3_test(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_common_cpu_sse3_test(void)
|
evas_common_cpu_sse3_test(void)
|
||||||
{
|
{
|
||||||
#ifdef BUILD_SSE3
|
#ifdef BUILD_SSE3
|
||||||
int data[4];
|
evas_common_op_sse3_test();
|
||||||
|
|
||||||
_mm_lddqu_si128((__m128i *)data);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,30 @@ op_blend_pixel_mask_neon.c \
|
||||||
op_blend_pixel_mask_sse3.c \
|
op_blend_pixel_mask_sse3.c \
|
||||||
op_blend_pixel_neon.c \
|
op_blend_pixel_neon.c \
|
||||||
op_blend_pixel_sse3.c
|
op_blend_pixel_sse3.c
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la
|
||||||
|
|
||||||
|
libevas_engine_common_op_blend_master_sse3_la_SOURCES = \
|
||||||
|
op_blend_master_sse3.c
|
||||||
|
|
||||||
|
libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \
|
||||||
|
-I. \
|
||||||
|
-I$(top_srcdir)/src/lib \
|
||||||
|
-I$(top_srcdir)/src/lib/engines/common \
|
||||||
|
-I$(top_srcdir)/src/lib/engines/common/evas_op_blend \
|
||||||
|
-I$(top_srcdir)/src/lib/cserve \
|
||||||
|
-I$(top_srcdir)/src/lib/include \
|
||||||
|
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||||
|
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||||
|
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||||
|
@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
|
||||||
|
@PIXMAN_CFLAGS@ \
|
||||||
|
@EET_CFLAGS@ @pthread_cflags@ \
|
||||||
|
@WIN32_CFLAGS@ @EINA_CFLAGS@ \
|
||||||
|
@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
|
||||||
|
@PIXMAN_CFLAGS@ \
|
||||||
|
@EVAS_SSE3_CFLAGS@
|
||||||
|
|
||||||
|
libevas_engine_common_op_blend_master_sse3_la_DEPENENCIES = \
|
||||||
|
$(top_builddir)/config.h
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
#define NEED_SSE3 1
|
||||||
|
|
||||||
|
#include "evas_common.h"
|
||||||
|
|
||||||
|
#ifdef BUILD_SSE3
|
||||||
|
static __m128i A_MASK_SSE3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
|
extern RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
|
|
||||||
|
extern RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
|
extern RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
|
|
||||||
|
# include "op_blend_pixel_sse3.c"
|
||||||
|
# include "op_blend_color_sse3.c"
|
||||||
|
# include "op_blend_pixel_color_sse3.c"
|
||||||
|
# include "op_blend_pixel_mask_sse3.c"
|
||||||
|
# include "op_blend_mask_color_sse3.c"
|
||||||
|
|
||||||
|
void
|
||||||
|
evas_common_op_blend_init_sse3(void)
|
||||||
|
{
|
||||||
|
#ifdef BUILD_SSE3
|
||||||
|
GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF);
|
||||||
|
RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00);
|
||||||
|
SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF);
|
||||||
|
RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
|
||||||
|
A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
|
||||||
|
ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256);
|
||||||
|
|
||||||
|
init_blend_pixel_span_funcs_sse3();
|
||||||
|
init_blend_pixel_color_span_funcs_sse3();
|
||||||
|
init_blend_pixel_mask_span_funcs_sse3();
|
||||||
|
init_blend_color_span_funcs_sse3();
|
||||||
|
init_blend_mask_color_span_funcs_sse3();
|
||||||
|
|
||||||
|
init_blend_pixel_pt_funcs_sse3();
|
||||||
|
init_blend_pixel_color_pt_funcs_sse3();
|
||||||
|
init_blend_pixel_mask_pt_funcs_sse3();
|
||||||
|
init_blend_color_pt_funcs_sse3();
|
||||||
|
init_blend_mask_color_pt_funcs_sse3();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
evas_common_op_blend_rel_init_sse3(void)
|
||||||
|
{
|
||||||
|
#ifdef BUILD_SSE3
|
||||||
|
init_blend_rel_pixel_span_funcs_sse3();
|
||||||
|
init_blend_rel_pixel_color_span_funcs_sse3();
|
||||||
|
init_blend_rel_pixel_mask_span_funcs_sse3();
|
||||||
|
init_blend_rel_color_span_funcs_sse3();
|
||||||
|
init_blend_rel_mask_color_span_funcs_sse3();
|
||||||
|
|
||||||
|
init_blend_rel_pixel_pt_funcs_sse3();
|
||||||
|
init_blend_rel_pixel_color_pt_funcs_sse3();
|
||||||
|
init_blend_rel_pixel_mask_pt_funcs_sse3();
|
||||||
|
init_blend_rel_color_pt_funcs_sse3();
|
||||||
|
init_blend_rel_mask_color_pt_funcs_sse3();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
evas_common_op_sse3_test(void)
|
||||||
|
{
|
||||||
|
#ifdef BUILD_SSE3
|
||||||
|
int data[4];
|
||||||
|
|
||||||
|
_mm_lddqu_si128((__m128i *)data);
|
||||||
|
#endif
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
|
|
||||||
static RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
static RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
|
|
||||||
static void op_blend_init(void);
|
static void op_blend_init(void);
|
||||||
static void op_blend_shutdown(void);
|
static void op_blend_shutdown(void);
|
||||||
|
@ -35,8 +35,8 @@ evas_common_gfx_compositor_blend_get(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
static RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
|
||||||
|
|
||||||
static void op_blend_rel_init(void);
|
static void op_blend_rel_init(void);
|
||||||
static void op_blend_rel_shutdown(void);
|
static void op_blend_rel_shutdown(void);
|
||||||
|
@ -84,15 +84,6 @@ evas_common_gfx_compositor_blend_rel_get(void)
|
||||||
# include "./evas_op_blend/op_blend_mask_color_i386.c"
|
# include "./evas_op_blend/op_blend_mask_color_i386.c"
|
||||||
//# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c"
|
//# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c"
|
||||||
|
|
||||||
#ifdef BUILD_SSE3
|
|
||||||
static __m128i A_MASK_SSE3;
|
|
||||||
#endif
|
|
||||||
# include "./evas_op_blend/op_blend_pixel_sse3.c"
|
|
||||||
# include "./evas_op_blend/op_blend_color_sse3.c"
|
|
||||||
# include "./evas_op_blend/op_blend_pixel_color_sse3.c"
|
|
||||||
# include "./evas_op_blend/op_blend_pixel_mask_sse3.c"
|
|
||||||
# include "./evas_op_blend/op_blend_mask_color_sse3.c"
|
|
||||||
|
|
||||||
# include "./evas_op_blend/op_blend_pixel_neon.c"
|
# include "./evas_op_blend/op_blend_pixel_neon.c"
|
||||||
# include "./evas_op_blend/op_blend_color_neon.c"
|
# include "./evas_op_blend/op_blend_color_neon.c"
|
||||||
# include "./evas_op_blend/op_blend_pixel_color_neon.c"
|
# include "./evas_op_blend/op_blend_pixel_color_neon.c"
|
||||||
|
@ -100,30 +91,17 @@ static __m128i A_MASK_SSE3;
|
||||||
# include "./evas_op_blend/op_blend_mask_color_neon.c"
|
# include "./evas_op_blend/op_blend_mask_color_neon.c"
|
||||||
//# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c"
|
//# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c"
|
||||||
|
|
||||||
|
#ifdef BUILD_SSE3
|
||||||
|
void evas_common_op_blend_init_sse3(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
op_blend_init(void)
|
op_blend_init(void)
|
||||||
{
|
{
|
||||||
memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs));
|
memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs));
|
||||||
memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs));
|
memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs));
|
||||||
#ifdef BUILD_SSE3
|
#ifdef BUILD_SSE3
|
||||||
GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF);
|
evas_common_op_blend_init_sse3();
|
||||||
RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00);
|
|
||||||
SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF);
|
|
||||||
RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
|
|
||||||
A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
|
|
||||||
ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256);
|
|
||||||
|
|
||||||
init_blend_pixel_span_funcs_sse3();
|
|
||||||
init_blend_pixel_color_span_funcs_sse3();
|
|
||||||
init_blend_pixel_mask_span_funcs_sse3();
|
|
||||||
init_blend_color_span_funcs_sse3();
|
|
||||||
init_blend_mask_color_span_funcs_sse3();
|
|
||||||
|
|
||||||
init_blend_pixel_pt_funcs_sse3();
|
|
||||||
init_blend_pixel_color_pt_funcs_sse3();
|
|
||||||
init_blend_pixel_mask_pt_funcs_sse3();
|
|
||||||
init_blend_color_pt_funcs_sse3();
|
|
||||||
init_blend_mask_color_pt_funcs_sse3();
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef BUILD_MMX
|
#ifdef BUILD_MMX
|
||||||
init_blend_pixel_span_funcs_mmx();
|
init_blend_pixel_span_funcs_mmx();
|
||||||
|
@ -406,6 +384,7 @@ op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
|
||||||
return blend_gfx_pt_func_cpu(s, m, c, d);
|
return blend_gfx_pt_func_cpu(s, m, c, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void evas_common_op_blend_rel_init_sse3(void);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
op_blend_rel_init(void)
|
op_blend_rel_init(void)
|
||||||
|
@ -413,17 +392,7 @@ op_blend_rel_init(void)
|
||||||
memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs));
|
memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs));
|
||||||
memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs));
|
memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs));
|
||||||
#ifdef BUILD_SSE3
|
#ifdef BUILD_SSE3
|
||||||
init_blend_rel_pixel_span_funcs_sse3();
|
evas_common_op_blend_rel_init_sse3();
|
||||||
init_blend_rel_pixel_color_span_funcs_sse3();
|
|
||||||
init_blend_rel_pixel_mask_span_funcs_sse3();
|
|
||||||
init_blend_rel_color_span_funcs_sse3();
|
|
||||||
init_blend_rel_mask_color_span_funcs_sse3();
|
|
||||||
|
|
||||||
init_blend_rel_pixel_pt_funcs_sse3();
|
|
||||||
init_blend_rel_pixel_color_pt_funcs_sse3();
|
|
||||||
init_blend_rel_pixel_mask_pt_funcs_sse3();
|
|
||||||
init_blend_rel_color_pt_funcs_sse3();
|
|
||||||
init_blend_rel_mask_color_pt_funcs_sse3();
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef BUILD_MMX
|
#ifdef BUILD_MMX
|
||||||
init_blend_rel_pixel_span_funcs_mmx();
|
init_blend_rel_pixel_span_funcs_mmx();
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
#include "evas_mmx.h"
|
#include "evas_mmx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined BUILD_SSE3
|
|
||||||
#include <immintrin.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef NEED_SSE3
|
||||||
|
# if defined BUILD_SSE3
|
||||||
|
# include <immintrin.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* src pixel flags: */
|
/* src pixel flags: */
|
||||||
|
|
||||||
/* pixels none */
|
/* pixels none */
|
||||||
|
@ -187,6 +189,7 @@ extern const DATA32 ALPHA_256;
|
||||||
|
|
||||||
/* some useful SSE3 inline functions */
|
/* some useful SSE3 inline functions */
|
||||||
|
|
||||||
|
#ifdef NEED_SSE3
|
||||||
#ifdef BUILD_SSE3
|
#ifdef BUILD_SSE3
|
||||||
|
|
||||||
static __m128i GA_MASK_SSE3;
|
static __m128i GA_MASK_SSE3;
|
||||||
|
@ -369,6 +372,7 @@ mul3_sym_sse3(__m128i x, __m128i y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue