The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
[Android] Massive Performance Problem
dbrady


Joined: 20 Jan 2014
Posts: 11
I've been trying to find out why we are unexpectedly slow on Adreno GPUs all week. I tracked the problem down to this in SDL_androidgl.c

Code:

void
Android_GLES_SwapWindow(_THIS, SDL_Window * window)
{
    /* FIXME: These two functions were in the Java code, do we really need them? */
    _this->egl_data->eglWaitNative(EGL_CORE_NATIVE_ENGINE);
    _this->egl_data->eglWaitGL();
    SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
}


I really can't see any reason why we would want those two functions in our SwapWindow function. It completely eliminates any performance gains from double buffering and absolutely kills framerate.
[Android] Massive Performance Problem
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
I'm inclined to remove those lines, yet I'd like to see if someone with the more problematic Android systems (I'm looking at you Samsung) reports any issues with that.


2014-01-29 dbrady
Quote:
I've been trying to find out why we are unexpectedly slow on Adreno GPUs all week. I tracked the problem down to this in SDL_androidgl.c




Code:


void
Android_GLES_SwapWindow(_THIS, SDL_Window * window)
{
    /* FIXME: These two functions were in the Java code, do we really need them? */
    _this->egl_data->eglWaitNative(EGL_CORE_NATIVE_ENGINE);
    _this->egl_data->eglWaitGL();
    SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
}





I really can't see any reason why we would want those two functions in our SwapWindow function. It completely eliminates any performance gains from double buffering and absolutely kills framerate.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





--
Gabriel.
dbrady


Joined: 20 Jan 2014
Posts: 11
I've tested it on a Galaxy S2 (T989) and Galaxy S4 (I337), and it worked fine. But both of them were running CyanogenMod 11, so it might not be the most valid of tests.
mr_tawan


Joined: 13 Jan 2014
Posts: 161
May be you can provide a test program. I have a stock Xperia Z1 (Snapdragon 800/Adreno 330) and a bunch of other Android devices.
[Android] Massive Performance Problem
Alvin Beach
Guest

I am using a Samsung Galaxy Tab 10.1 (Android 4.0.4) and a Samsung Galaxy Tab 2 7.0 (4.1 I believe).
No issues with performance with the Android project from 2.0.1.

I do plan to test SDL2 2.0.2 and I am willing to testing removal of those two lines (presumably the
two "_this->egl_data->eglWaitNative() and _this->egl_data->eglWaitGL()). Should I test SDL2 2.0.2
first or stick with 2.0.1?

Cheers,

Alvin

On 29/01/14 22:48, Gabriel Jacobo wrote:
Quote:
I'm inclined to remove those lines, yet I'd like to see if someone with the more problematic Android
systems (I'm looking at you Samsung) reports any issues with that.


2014-01-29 dbrady <mailto:>

__
I've been trying to find out why we are unexpectedly slow on Adreno GPUs all week. I tracked the
problem down to this in SDL_androidgl.c




Code:


void
Android_GLES_SwapWindow(_THIS, SDL_Window * window)
{
/* FIXME: These two functions were in the Java code, do we really need them? */
_this->egl_data->eglWaitNative(EGL_CORE_NATIVE_ENGINE);
_this->egl_data->eglWaitGL();
SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
}




I really can't see any reason why we would want those two functions in our SwapWindow function.
It completely eliminates any performance gains from double buffering and absolutely kills framerate.

_______________________________________________
SDL mailing list
<mailto:
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




--
Gabriel.


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
...
Timodor


Joined: 14 Apr 2013
Posts: 72
Location: Australia
I don't know if this is related, but I have Sony Experia which slows down ( to like half the speed) after you go on onpause and return back the game. With other Andriod Devices it works fine. This is the lastest SDL code, the previous SDL did not have this issue.