Re: [AD] Bug in Allegro's color convertors?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


>  > The patch doesn't compile for me (Mingw32, gcc 2.95.3) because of
>  >     +         movl $12(%esi), %edx;  /* Read 4[ARGB] */
>
> The weird thing is that it compiled for me, and I'm using the same
> compiler...

Pickier assembler ? Mine is GAS 2.11.90 for Mingw32.

> Oh dear. I probably inverted the alpha channel with another channel.

Nothing that serious:
- for the MMX code, you forgot to right-shift %mm3 by 24,
- for the non-MMX code, you replaced an occurence of %esi by %edi.

I also permuted the MMX registers to let them match the pixel index number.
Could you take a look and re-schedule the MMX instructions if needed ? You
know much more the topic than I do.

The results with the test program:

- MMX code on a K6-2/333:

Comparing test profile logs 32to24_MMX.log and 32to24-2_MMX.log

DRAW_MODE_SOLID results:

 putpixel()                       = 98%
 hline()                          = 97%
 vline()                          = 101%
 line()                           = 105%
 rectfill()                       = 105%
 circle()                         = 103%
 circlefill()                     = 101%
 ellipse()                        = 101%
 ellipsefill()                    = 102%
 arc()                            = 102%
 triangle()                       = 104%

Other functions:

 textout()                        = 102%
 vram->vram blit()                = 102%
 aligned vram->vram blit()        = 102%
 blit() from memory               = 102%
 aligned blit() from memory       = 100%
 vram->vram masked_blit()         = N/A
 masked_blit() from memory        = 101%
 draw_sprite()                    = 103%
 draw_rle_sprite()                = 103%
 draw_compiled_sprite()           = 103%
 draw_trans_sprite()              = 103%
 draw_trans_rle_sprite()          = 102%
 draw_lit_sprite()                = 103%
 draw_lit_rle_sprite()            = 103%


- non-MMX code on a Pentium Classic/200:

Comparing test profile logs 32to24_noMMX.log and 32to24-2_noMMX.log

DRAW_MODE_SOLID results:

 putpixel()                       = 99%
 hline()                          = 100%
 vline()                          = 101%
 line()                           = 96%
 rectfill()                       = 98%
 circle()                         = 94%
 circlefill()                     = 96%
 ellipse()                        = 92%
 ellipsefill()                    = 94%
 arc()                            = 94%
 triangle()                       = 96%

Other functions:

 textout()                        = 97%
 vram->vram blit()                = 100%
 aligned vram->vram blit()        = 100%
 blit() from memory               = 94%
 aligned blit() from memory       = 96%
 vram->vram masked_blit()         = N/A
 masked_blit() from memory        = 94%
 draw_sprite()                    = 95%
 draw_rle_sprite()                = 95%
 draw_compiled_sprite()           = 96%
 draw_trans_sprite()              = 96%
 draw_trans_rle_sprite()          = 96%
 draw_lit_sprite()                = 95%
 draw_lit_rle_sprite()            = 95%


I'm ok for applying the MMX part but more reluctant for the non-MMX one.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx

Attachment: icolconv2.zip
Description: Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/