Accelerated blitting in SDL and framebuffer access

      Accelerated blitting in SDL and framebuffer access

      Hi there!
      I'm playing with libSDL for the Wii/GC with the goal of implementing accelerated blitting. I started making some changes to the library, and my initial idea was that of exposing the EFB as the SDL_Surface pixel area, in order to avoid all those pixel copies that the current SDL Wii module is doing. This kind of works, but despite all the code I've removed, the FPS went down from 50 to 2. :)

      The EFB is mapped into the system RAM at two different addresses, one for cached access and one for uncached access, but switching between these two didn't make any difference: it draws at 2 FPS (on Dolphin; on the Wii it's apparently faster, but also exhibits lots of glitches and graphic corruption). Could there be something else that I didn't take into account?

      I now plan to drop this path and make it so that SDL accesses pixels from a texture, which would get the data from the EFB (using the GX_CopyTex() function). But before doing this, maybe someone has some ideas why the direct access to EFB is so slow?