forked from enlightenment/efl
evas: enable SSE3 blend functions
Patch by: Jim Kukunas <james.t.kukunas@linux.intel.com> SVN revision: 63704
This commit is contained in:
parent
a058ae7a5e
commit
24c56344eb
|
@ -84,6 +84,12 @@ evas_common_gfx_compositor_blend_rel_get(void)
|
|||
# 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_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"
|
||||
|
@ -96,6 +102,26 @@ 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();
|
||||
#endif
|
||||
#ifdef BUILD_MMX
|
||||
init_blend_pixel_span_funcs_mmx();
|
||||
init_blend_pixel_color_span_funcs_mmx();
|
||||
|
@ -121,7 +147,7 @@ op_blend_init(void)
|
|||
init_blend_pixel_mask_pt_funcs_neon();
|
||||
init_blend_color_pt_funcs_neon();
|
||||
init_blend_mask_color_pt_funcs_neon();
|
||||
#endif
|
||||
#endif
|
||||
#ifdef BUILD_C
|
||||
init_blend_pixel_span_funcs_c();
|
||||
init_blend_pixel_color_span_funcs_c();
|
||||
|
@ -147,6 +173,14 @@ blend_gfx_span_func_cpu(int s, int m, int c, int d)
|
|||
{
|
||||
RGBA_Gfx_Func func = NULL;
|
||||
int cpu = CPU_N;
|
||||
#ifdef BUILD_SSE3
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
|
||||
{
|
||||
cpu = CPU_SSE3;
|
||||
func = op_blend_span_funcs[s][m][c][d][cpu];
|
||||
if(func) return func;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_MMX
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
|
||||
{
|
||||
|
@ -263,6 +297,14 @@ blend_gfx_pt_func_cpu(int s, int m, int c, int d)
|
|||
{
|
||||
RGBA_Gfx_Pt_Func func = NULL;
|
||||
int cpu = CPU_N;
|
||||
#ifdef BUILD_SSE3
|
||||
if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
|
||||
{
|
||||
cpu = CPU_SSE3;
|
||||
func = op_blend_pt_funcs[s][m][c][d][cpu];
|
||||
if(func) return func;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_MMX
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
|
||||
{
|
||||
|
@ -367,6 +409,19 @@ 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_c();
|
||||
init_blend_rel_pixel_color_span_funcs_c();
|
||||
init_blend_rel_pixel_mask_span_funcs_c();
|
||||
init_blend_rel_color_span_funcs_c();
|
||||
init_blend_rel_mask_color_span_funcs_c();
|
||||
|
||||
init_blend_rel_pixel_pt_funcs_c();
|
||||
init_blend_rel_pixel_color_pt_funcs_c();
|
||||
init_blend_rel_pixel_mask_pt_funcs_c();
|
||||
init_blend_rel_color_pt_funcs_c();
|
||||
init_blend_rel_mask_color_pt_funcs_c();
|
||||
#endif
|
||||
#ifdef BUILD_MMX
|
||||
init_blend_rel_pixel_span_funcs_mmx();
|
||||
init_blend_rel_pixel_color_span_funcs_mmx();
|
||||
|
@ -418,6 +473,14 @@ blend_rel_gfx_span_func_cpu(int s, int m, int c, int d)
|
|||
{
|
||||
RGBA_Gfx_Func func = NULL;
|
||||
int cpu = CPU_N;
|
||||
#ifdef BUILD_SSE3
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
|
||||
{
|
||||
cpu = CPU_SSE3;
|
||||
func = op_blend_rel_span_funcs[s][m][c][d][cpu];
|
||||
if(func) return func;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_MMX
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
|
||||
{
|
||||
|
@ -529,6 +592,14 @@ blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
|
|||
{
|
||||
RGBA_Gfx_Pt_Func func = NULL;
|
||||
int cpu = CPU_N;
|
||||
#ifdef BUILD_SSE3
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
|
||||
{
|
||||
cpu = CPU_SSE3;
|
||||
func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
|
||||
if(func) return func;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_MMX
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue