[uae] SDL speedup

  • From: blynel@xxxxxxxxxx
  • To: uae@xxxxxxxxxxxxx
  • Date: Wed, 10 Nov 2004 21:28:41 +0100

Hi,

I have been looking a bit into why gfx-sdl compared to gfx-x11 ran so
slow on my system (AMD Athlon 750 mhz,GeForce2 GTS, mdk 10.1). In the
file src/gfx-sdl/sdlgfx.c the function 'flush_block' seems to be called
way too often from drawing.c whereas 'flush_screen' for some reason is
deactivated.

I changed to 'flush_block' into a noop and reactivated 'flush_screen' by
doing these changes

> diff sdlgfx.c sdlgfx.c.old
135a136,140
>     DEBUG_LOG ("Function: flush_block %d %d\n", ystart, ystop);
>
>     SDL_UnlockSurface (prSDLScreen);
>     SDL_UpdateRect (prSDLScreen, 0, ystart, current_width, ystop - ystart +
1);
>     SDL_LockSurface (prSDLScreen);
141a147
> #if 0
142a149
> #endif

Basically just flushing the whole screen each frame instead of doing a bunch
of small flushes. Now gfx-sdl runs as smooth as gfx-x11 (only tested running
Kick Off 2 though).

I think this could explain the sloppy speed you get on MacOS X as well,
so I encourage people to test it.

Cheers,

Jesper





>

Other related posts: