Etnaviv Notes for OpenDingux 2013-09-13
This is the first release of OpenDingux for the GCW Zero that includes Etnaviv. The Etnaviv project was first published around the start of the year 2013. It has made very good progress since then and now the time has come when we think it is ready to be included in OpenDingux.
What "ready" means is that there is enough functionality to run several games without game breaking glitches. There are sure to be many bugs and missing features, since this is a young and complex project. But we feel now is the right time to put it into the hands of all developers.
The Graphics Stack
The graphics stack contains the following components: (from high to low level)
- Application, such as a game or emulator
- Mesa: OpenGL ES implementation
- Gallium: user space driver, generic part
- Etnaviv: user space driver, hardware specific part
- Galcore: kernel driver by Vivante
- APIs: OpenGL ES 1 and OpenGL ES 2
- textures: 2D, cube maps
- texture compression: DXT1-5, ETC
- anti-aliasing: 1x, 2x or 4x MSAA
- vertex texture fetch
- 16 or 24 bit depth buffer
- 0 bit or 8 bit stencil buffer
- 8, 16 or 32 bit (OES_element_index_uint) indices for glDrawElements
GLES 1 extensions
GLES 2 extensions
Known Bugs and Issues
- loops in shaders are not supported
- indirect access to uniforms not yet supported
- GLSL "discard" not yet supported
- gl_FrontFacing not yet supported
- GLSL "texture" bias parameter not yet supported
- GLSL "textureLod" not yet supported
- reading from framebuffer (when supertiled) not yet supported
- extension "GL_OES_texture_3D" is erroneously reported (but with max texture size 0); the hardware has no support for 3D textures
All required headers and libs are included in the 2013-09-13 release of the OpenDingux toolchain for the GCW Zero; older releases won't work.
Use EGL to set up a context for OpenGL ES. We're looking at adding SDL2 as an alternative, but EGL is the only option in this release. Add
-DMESA_EGL_NO_X11_HEADERS to your compile flags, so Mesa's EGL headers won't try to include X11 functionality which OpenDingux doesn't have.
Example code can be found in this project.
- always use vertex buffer objects (VBOs)
- put vertices into one interleaved VBO, not multiple VBOs
- use compressed textures (DXTx or ETC) where possible
- when drawing with glDrawElements use the smallest possible index size
The apitrace tool is included in the rootfs. It can capture GL ES calls made by an application for later replay and inspection.
Although most of the critical problems should have been solved by now, some
unknown rendering bugs and crashes may still be present.
Report issues and rendering problems in the Etnaviv issue tracker.
When reporting an issue provide as much information as possible about the GLES
and GLSL functions and extensions used and other information that may be useful
for narrowing down the problem.
If possible, attach an apitrace dump that shows the problem (run
apitrace trace -a egl executable on the device and send the resulting
.trace file). These can be replayed on various devices to find out when divergences occur.
The latest source code can be found at on github: Etnaviv and
Help with development is very welcome. Join #etnaviv on irc.freenode.net via IRC or web chat) to contact the developers.