[SDL] [PATCH] DGA driver buggy and slow

Pauty jpauty at irisa.fr
Mon Nov 4 05:47:00 PST 2002


Hello,

Will this patch be applied to the library source in the CVS ? Such an optimisation
seems to be cool.

Julien

On Fri, 1 Nov 2002 10:13:15 +0100
Cezary Kaliszyk <ck189400 at zodiac.mimuw.edu.pl> wrote:

> DGA should be the fastest driver on linux, but it currently isn't (wasn't).
> (with "testsprites -hw -flip 10000") It is 4 times slower then directfb. 
> 
> The bug is that after each operation it calls XFlush, which is a slow
> network operation (switching context). With many consequent blits or fills
> it may slow down the whole application about 4 times. 
> 
> XFlush needs to be called if we jut do a single operation, and than
> do our things for a longer while. But in doublebuffered mode it does not
> need to be called after every operation, only before the flip.
> 
> So I made up a little patch that does this. I test it with
> "SDL_VIDEODRIVER=dga ./testsprites -hw -flip 10000".
> 
> Before patch:        5.32 fps
> After:              21.43 fps
> 
> Now the dga driver is the fastest on linux.
> (compared to directfb 21.07 fps).
> 
> We can't get much more out of the dga driver since after rewriting the
> whole test without SDL (pure calls to X and XDGA) i got 21.44 fps.
> (If anyone wants the nonsdl test source just tell)
> 
> Cezary Kaliszyk.
> 
> -- 
> 




More information about the SDL mailing list