[SDL] SDL X11 blit/update performance tweaking?
stephena at roadrunner.nf.net
Wed Feb 19 08:11:04 PST 2003
On February 19, 2003 12:30 pm, Reinoud wrote:
> I've run into an unexpected performance bottleneck with SDL on my
> linux/X11 system. The problem is that either SDL_UpdateRect() with
> the X11 driver, or SDL_BlitSurface() with the DGA driver and a
> SDL_HWSURFACE, take over 25ms for a screen update. However, my total
> time budged per frame is 20ms, and there's a little more to be done
> than just updating the screen :-).
> A few facts:
> - P4 1.7, i845E, GeForce2 GTS
> - linux 2.4.20 (with a few patches and hacks that shouldn't affect X)
> - XFree86 4.1.0 (oldish, but so is the GeForce2;)
> - 32bpp X visual, updated from a 1024x768 32b 'native' format surface
> - the surface flags do _not_ report SDL_HWACCEL (with X11 or DGA).
The flags don't indicate hardware acceleration because there is none under
X11 normally. Also, if you use the DGA driver, you must be root.
Some possible options include lowering color depth or resolution. A
better solution would be to switch to some sort of dirty update. If much
of your screen isn't changing, there is really no need to update those
More information about the SDL