- Joined
- Sep 18, 2011
- Messages
- 742
OpenGL(ES) on the Pandora has a massive bottleneck (other than the fact it's a GPU from 2005): texture uploads are extremely slow, and require an inordinate amount of CPU time.
I've toyed with solutions for a while, and I'm here to announce a new project.
TinyGLES is a software-rendered OpenGL ES library aiming to fully replace the SGX for 2D rendering (with much higher framerates) and basic 3D rendering. It's an extension of my work on glshim and a revival of an old project by Febrice Bellard called TinyGL.
My current reference OpenGL branch of Uplink with batched pixel rendering (which means no z-order for glDrawPixels and glBitmap) runs at 1-4fps on my CC Pandora using glshim and the SGX 530 GPU.
If I use TinyGLES, Uplink framerate (still on my CC) is currently closer to 35-60fps, with a potential 20fps+ boost if I remove X11 from the equation. This includes z-ordering, so layers overlap properly. I could guess at another 30-100fps+ boost by optimizing the 3D rendering pipeline with NEON and adding special cases for obvious 2D rendering paths.
Status:
- Beta-quality.
- I'm still really bad at NEON.
- Some crashes.
- Visual problems in some cases.
- Incomplete GL ES feature list (I got a 20fps boost in Uplink just by disabling my debug "STUB" prints)
- Currently requires you to use glx instead of egl (and honestly works much better with glshim in front of it).
Goals:
- Fully NEON-optimized rendering (the code is mostly C right now)
- Full OpenGL ES 1.x compatibility (it's okay if glshim is used for some of this)
- Some OpenGL functionality that would be much faster to include directly (or virtually impossible to bolt on with glshim)
- glDrawPixels (because we can directly write to the internal framebuffer)
- glRenderMode is far easier (GL_SELECT is already supported)
- glReadPixels can use the depth buffer (used in Cube and AssaultCube)
I may eventually integrate this completely into glshim, as a helper (for stuff like GL_SELECT) and as an optional rendering backend.
Usage:
- Grab the NEON branch from here: https://github.com/lunixbochs/tinygles
- Grab the tinygles branch from glshim: https://github.com/lunixbochs/glshim
- Build both projects, throw the libs in your library path (you might need to link multiple variants of libGL.so, libGL.so.1, libGL.so.1.2.0)
This glshim branch has a new environment variable called "LIBGL_GLES" which is used as an override for the path of the GLES client library.
I'll see about putting together a demo pnd for this.
I've toyed with solutions for a while, and I'm here to announce a new project.
TinyGLES is a software-rendered OpenGL ES library aiming to fully replace the SGX for 2D rendering (with much higher framerates) and basic 3D rendering. It's an extension of my work on glshim and a revival of an old project by Febrice Bellard called TinyGL.
My current reference OpenGL branch of Uplink with batched pixel rendering (which means no z-order for glDrawPixels and glBitmap) runs at 1-4fps on my CC Pandora using glshim and the SGX 530 GPU.
If I use TinyGLES, Uplink framerate (still on my CC) is currently closer to 35-60fps, with a potential 20fps+ boost if I remove X11 from the equation. This includes z-ordering, so layers overlap properly. I could guess at another 30-100fps+ boost by optimizing the 3D rendering pipeline with NEON and adding special cases for obvious 2D rendering paths.
Status:
- Beta-quality.
- I'm still really bad at NEON.
- Some crashes.
- Visual problems in some cases.
- Incomplete GL ES feature list (I got a 20fps boost in Uplink just by disabling my debug "STUB" prints)
- Currently requires you to use glx instead of egl (and honestly works much better with glshim in front of it).
Goals:
- Fully NEON-optimized rendering (the code is mostly C right now)
- Full OpenGL ES 1.x compatibility (it's okay if glshim is used for some of this)
- Some OpenGL functionality that would be much faster to include directly (or virtually impossible to bolt on with glshim)
- glDrawPixels (because we can directly write to the internal framebuffer)
- glRenderMode is far easier (GL_SELECT is already supported)
- glReadPixels can use the depth buffer (used in Cube and AssaultCube)
I may eventually integrate this completely into glshim, as a helper (for stuff like GL_SELECT) and as an optional rendering backend.
Usage:
- Grab the NEON branch from here: https://github.com/lunixbochs/tinygles
- Grab the tinygles branch from glshim: https://github.com/lunixbochs/glshim
- Build both projects, throw the libs in your library path (you might need to link multiple variants of libGL.so, libGL.so.1, libGL.so.1.2.0)
This glshim branch has a new environment variable called "LIBGL_GLES" which is used as an override for the path of the GLES client library.
I'll see about putting together a demo pnd for this.
Last edited by a moderator: