build_cpu_sse3="no"
case $host_cpu in
i*86)
- build_cpu_sse3="no"
+ build_cpu_sse3="yes"
;;
x86_64)
build_cpu_sse3="yes"
# 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
# off until further notice for 32bit x86.
-EVAS_SSE3_CFLAGS="-msse3 "
+EVAS_SSE3_CFLAGS=" "
if test "x$build_cpu_sse3" = "xyes" ; then
- CFLAGS="${CFLAGS} ${EVAS_SSE3_CFLAGS}"
+ EVAS_SSE3_CFLAGS="-msse3 "
+# CFLAGS="${CFLAGS} ${EVAS_SSE3_CFLAGS}"
fi
AC_SUBST(CFLAGS)
+AC_SUBST(EVAS_SSE3_CFLAGS)
#######################################
## ALTIVEC
libevas_engine_common_la_DEPENDENCIES = \
$(top_builddir)/config.h
+
+libevas_engine_common_la_LIBADD = \
+evas_op_blend/libevas_engine_common_op_blend_master_sse3.la
#endif
}
+void evas_common_op_sse3_test(void);
+
void
evas_common_cpu_sse3_test(void)
{
#ifdef BUILD_SSE3
- int data[4];
-
- _mm_lddqu_si128((__m128i *)data);
+ evas_common_op_sse3_test();
#endif
}
op_blend_pixel_mask_sse3.c \
op_blend_pixel_neon.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
+
--- /dev/null
+#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
+}
#include "evas_common.h"
-static 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_Func op_blend_span_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_shutdown(void);
}
-static 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_Func op_blend_rel_span_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_shutdown(void);
# include "./evas_op_blend/op_blend_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_color_neon.c"
# include "./evas_op_blend/op_blend_pixel_color_neon.c"
# include "./evas_op_blend/op_blend_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
op_blend_init(void)
{
memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs));
memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs));
#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();
+ evas_common_op_blend_init_sse3();
#endif
#ifdef BUILD_MMX
init_blend_pixel_span_funcs_mmx();
return blend_gfx_pt_func_cpu(s, m, c, d);
}
+void evas_common_op_blend_rel_init_sse3(void);
static void
op_blend_rel_init(void)
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));
#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();
+ evas_common_op_blend_rel_init_sse3();
#endif
#ifdef BUILD_MMX
init_blend_rel_pixel_span_funcs_mmx();
#include "evas_mmx.h"
#endif
-#if defined BUILD_SSE3
-#include <immintrin.h>
-#endif
-
#include "config.h"
+#ifdef NEED_SSE3
+# if defined BUILD_SSE3
+# include <immintrin.h>
+# endif
+#endif
+
/* src pixel flags: */
/* pixels none */
/* some useful SSE3 inline functions */
+#ifdef NEED_SSE3
#ifdef BUILD_SSE3
static __m128i GA_MASK_SSE3;
#endif
+#endif
#endif