From 6fe8ee962ff9e43f2e3e4b9170ec240f4535fe43 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 2 Sep 2000 07:27:50 +0000 Subject: [PATCH] foudn bug in mmx asm blending.. 1 line hihg blends get skipped.. fix! :) (ugly fix tho) SVN revision: 3296 --- TODO | 2 +- src/asm_blend.S | 4 +++- src/blend.c | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index c7bbf0d..a950308 100644 --- a/TODO +++ b/TODO @@ -3,4 +3,4 @@ path rendering is correct for that visual * formalize loader/saver api * fix loaders to only build if libs are present * move db loader/saver to use edb - +* bug in mmx image -> image blending skips 1 line high segments diff --git a/src/asm_blend.S b/src/asm_blend.S index b1aab28..5d40454 100644 --- a/src/asm_blend.S +++ b/src/asm_blend.S @@ -119,8 +119,10 @@ c1: .word 0x1, 0x1, 0x1, 0x1 leal (%edi, %ebx, 4), %edi ;\ negl %ebx ;\ jz 9f ;\ + incl %edx ;\ decl %edx ;\ jz 9f ;\ + decl %edx ;\ #define LOOP_START \ 8: ;\ @@ -148,7 +150,7 @@ c1: .word 0x1, 0x1, 0x1, 0x1 popl %ebp ;\ ret - +/****!!!!!!!!1 has bug wiht 1 line high ********/ PR_(imlib_mmx_blend_rgba_to_rgb): ENTER diff --git a/src/blend.c b/src/blend.c index dde6f85..2900ff0 100644 --- a/src/blend.c +++ b/src/blend.c @@ -906,7 +906,7 @@ __imlib_GetBlendFunction(ImlibOp op, char blend, char merge_alpha, char rgb_src, #ifdef DO_MMX_ASM /*\ OP_COPY \*/ - {{{{{ __imlib_mmx_copy_rgba_to_rgb, __imlib_mmx_blend_rgba_to_rgb }, + {{{{{ __imlib_mmx_copy_rgba_to_rgb, __imlib_mmx_blend_rgba_to_rgb}, { __imlib_mmx_copy_rgb_to_rgb, __imlib_mmx_blend_rgb_to_rgb } }, {{ __imlib_mmx_copy_rgba_to_rgba, __imlib_BlendRGBAToRGBA/*__imlib_mmx_blend_rgba_to_rgba*/ }, { __imlib_mmx_copy_rgb_to_rgba, __imlib_mmx_blend_rgb_to_rgba } } }, @@ -1202,7 +1202,6 @@ __imlib_BlendImageToImage(ImlibImage *im_src, ImlibImage *im_dst, else __imlib_ScaleSampleRGBA(scaleinfo, buf, dxx, dyy + y, 0, 0, dw, hh, dw); - __imlib_BlendRGBAToData(buf, dw, hh, im_dst->data, im_dst->w, im_dst->h,