summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-11-04 11:51:42 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-11-04 11:51:42 +0000
commitc15e9c6575c3b5f39ded167dda5259de3de96151 (patch)
tree5115d7ae3620af24c2bc094cd062575af7adeda9 /src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c
parenta5ac6a987caec5a7f7596a25d0a065b9cc94c50c (diff)
merge: and now Evas
I've tested make -j 3 install and it works nicely I've tested expedite with software and opengl xlib, and it works. Not tested other engines, so please report any problems (engines or other) on the ML. TODO: examples and tests, I'll add them later ISSUE: Eina_Unicode size check. It indirectly depends on eina_config.h, which is created at the end of the configure script. So its size is always 0. I don't know how that size is used, so I can't do a lot, for now. SVN revision: 78895
Diffstat (limited to 'src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c')
-rw-r--r--src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c b/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c
new file mode 100644
index 0000000000..eac6755b97
--- /dev/null
+++ b/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c
@@ -0,0 +1,77 @@
1#define NEED_SSE3 1
2
3#include "evas_common.h"
4
5#ifdef BUILD_SSE3
6static __m128i A_MASK_SSE3;
7#endif
8
9extern RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
10extern RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
11
12extern RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
13extern RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
14
15# include "op_blend_pixel_sse3.c"
16# include "op_blend_color_sse3.c"
17# include "op_blend_pixel_color_sse3.c"
18# include "op_blend_pixel_mask_sse3.c"
19# include "op_blend_mask_color_sse3.c"
20
21void
22evas_common_op_blend_init_sse3(void)
23{
24#ifdef BUILD_SSE3
25 GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF);
26 RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00);
27 SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF);
28 RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
29 A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
30 ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256);
31
32 init_blend_pixel_span_funcs_sse3();
33 init_blend_pixel_color_span_funcs_sse3();
34 init_blend_pixel_mask_span_funcs_sse3();
35 init_blend_color_span_funcs_sse3();
36 init_blend_mask_color_span_funcs_sse3();
37
38 init_blend_pixel_pt_funcs_sse3();
39 init_blend_pixel_color_pt_funcs_sse3();
40 init_blend_pixel_mask_pt_funcs_sse3();
41 init_blend_color_pt_funcs_sse3();
42 init_blend_mask_color_pt_funcs_sse3();
43#endif
44}
45
46void
47evas_common_op_blend_rel_init_sse3(void)
48{
49#ifdef BUILD_SSE3
50 init_blend_rel_pixel_span_funcs_sse3();
51 init_blend_rel_pixel_color_span_funcs_sse3();
52 init_blend_rel_pixel_mask_span_funcs_sse3();
53 init_blend_rel_color_span_funcs_sse3();
54 init_blend_rel_mask_color_span_funcs_sse3();
55
56 init_blend_rel_pixel_pt_funcs_sse3();
57 init_blend_rel_pixel_color_pt_funcs_sse3();
58 init_blend_rel_pixel_mask_pt_funcs_sse3();
59 init_blend_rel_color_pt_funcs_sse3();
60 init_blend_rel_mask_color_pt_funcs_sse3();
61#endif
62}
63
64//#pragma GCC push_options
65//#pragma GCC optimize ("O0")
66void
67evas_common_op_sse3_test(void)
68{
69#ifdef BUILD_SSE3
70 DATA32 s[64] = {0x11883399}, d[64] = {0xff88cc33};
71
72 s[0] = rand(); d[1] = rand();
73 _op_blend_pas_dp_sse3(s, NULL, 0, d, 64);
74 evas_common_cpu_end_opt();
75#endif
76}
77//#pragma GCC pop_options