[SDL] [patch] MMX alpha blit patches with MMX detection

Stephane Marchesin stephane.marchesin at wanadoo.fr
Fri Aug 22 07:06:07 PDT 2003


Sam Lantinga wrote:

>>I think everything is correct now. I've done as much testing as I could, 
>>but some real-world testing wouldn't hurt, I think.
>>The patch is here : http://icps.u-strasbg.fr/~marchesin/sdl_mmxblit.patch
>>
>
>Looks good, I added it to CVS.
>
Great :)

>
>
>What tests did you run to compare performance of the blitting functions?
>
I used quick & dirty benchmarks like this :

        start=SDL_GetTicks();
        for(j = 0; j < TIMES; j++)
                for(i = 0; i < SIZE ; i++)
                BLIT_TRANSL_888(src1[i], dst1[i]);
        end=SDL_GetTicks();
        printf("time taken : %d\n",end-start);

        start=SDL_GetTicks();
        for(j = 0; j < TIMES; j++)
                for(i = 0; i < SIZE ; i++)
                BLIT_TRANSL_888MMX(src2[i], dst2[i]);
        end=SDL_GetTicks();
        printf("time taken : %d\n",end,end-start);

Of course, I had to cut & paste the functions on the source code of the 
benchmark (yes, dirty).

I didn't find any benchmark testing the alpha blitting functions (and 
testing them all would mean having to switch video depth anyway) so I 
used little hacks like this. Maybe an extension to testvidinfo could 
test alpha blits....

Stephane






More information about the SDL mailing list