Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_blend_pixel_pixel.c evas_draw_main.c Log Message: use mmx2 routines if we can - they are faster! (almost 3 times) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_pixel_pixel.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- evas_blend_pixel_pixel.c 10 May 2004 06:40:50 -0000 1.10 +++ evas_blend_pixel_pixel.c 26 May 2004 02:45:40 -0000 1.11 @@ -4,6 +4,8 @@ #include "evas_mmx.h" #endif +#define ALIGN_FIX + extern DATA8 *_evas_pow_lut; extern const DATA16 _evas_const_c1[4]; @@ -171,6 +173,7 @@ evas_common_copy_pixels_rgba_to_rgba_mmx(DATA32 *src, DATA32 *dst, int len) { DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre; +#ifdef ALIGN_FIX int src_align; int dst_align; @@ -196,6 +199,8 @@ #endif return; } +#endif + src_ptr = src; dst_ptr = dst; dst_end_ptr = dst + len; @@ -221,6 +226,7 @@ evas_common_copy_pixels_rgba_to_rgba_mmx2(DATA32 *src, DATA32 *dst, int len) { DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre; +#ifdef ALIGN_FIX int src_align; int dst_align; @@ -246,6 +252,8 @@ #endif return; } +#endif + src_ptr = src; dst_ptr = dst; dst_end_ptr = dst + len; @@ -271,6 +279,7 @@ evas_common_copy_pixels_rgba_to_rgba_sse(DATA32 *src, DATA32 *dst, int len) { DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre; +#ifdef ALIGN_FIX int src_align; int dst_align; @@ -296,6 +305,7 @@ #endif return; } +#endif src_ptr = src; dst_ptr = dst; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_draw_main.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- evas_draw_main.c 13 May 2004 01:57:28 -0000 1.8 +++ evas_draw_main.c 26 May 2004 02:45:40 -0000 1.9 @@ -532,7 +532,42 @@ } else { -#ifdef BUILD_SSE +#if 1 + +# ifdef BUILD_MMX +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_mmx2; +# ifdef BUILD_SSE + else +# endif +#endif +#ifdef BUILD_SSE +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_sse; +# ifdef BUILD_MMX + else +# endif +#endif +#ifdef BUILD_MMX +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_mmx; +# ifdef BUILD_C + else +# endif +#endif +#ifdef BUILD_C + return evas_common_copy_pixels_rgba_to_rgba_c; +#endif + +#else + +# ifdef BUILD_SSE if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) return evas_common_copy_pixels_rgba_to_rgba_sse; # ifdef BUILD_MMX @@ -554,6 +589,8 @@ #endif #ifdef BUILD_C return evas_common_copy_pixels_rgba_to_rgba_c; +#endif + #endif } } @@ -596,7 +633,7 @@ else { #ifdef BUILD_SSE - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64)) return evas_common_copy_color_rgba_to_rgba_sse; #endif #ifdef BUILD_MMX @@ -755,25 +792,66 @@ } else { -#ifdef BUILD_SSE - if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) - return evas_common_copy_pixels_rgba_to_rgba_sse; +#if 1 + +# ifdef BUILD_MMX +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_mmx2; +# ifdef BUILD_SSE + else +# endif +#endif +#ifdef BUILD_SSE +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_sse; +# ifdef BUILD_MMX + else +# endif #endif #ifdef BUILD_MMX -# ifdef BUILD_SSE - else +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_mmx; +# ifdef BUILD_C + else # endif - if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) - return evas_common_copy_pixels_rgba_to_rgba_mmx2; - else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) - return evas_common_copy_pixels_rgba_to_rgba_mmx; -#endif +#endif #ifdef BUILD_C + return evas_common_copy_pixels_rgba_to_rgba_c; +#endif + +#else + +# ifdef BUILD_SSE + if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) + return evas_common_copy_pixels_rgba_to_rgba_sse; # ifdef BUILD_MMX - else + else # endif - return evas_common_copy_pixels_rgba_to_rgba_c; #endif +#ifdef BUILD_MMX +# ifdef BUILD_C + if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_mmx2; +# ifdef BUILD_C + else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) +# endif + return evas_common_copy_pixels_rgba_to_rgba_mmx; +# ifdef BUILD_C + else +# endif +#endif +#ifdef BUILD_C + return evas_common_copy_pixels_rgba_to_rgba_c; +#endif + +#endif } if (!_evas_pow_lut) evas_common_blend_init_evas_pow_lut(); #ifdef BUILD_C ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs