[ Quick link: Changes in this release ]
Etnaviv Notes for OpenDingux 2013-10-04
This is the second 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
- Extension "GL_OES_texture_3D" no longer erroneously reported; the hardware has no support for 3D textures
- 16 bit textures are no longer blown up to 32 bit, resulting in reduced size, memory bandwidth and conversion overhead when 16 bit textures are used
- No more need to add
-DMESA_EGL_NO_X11_HEADERS to your compile flags
- Fix mipmap computation for non-power of two textures
- Fix crash issue when doing multiple clears per frame
- Fix stale uniforms issue (this caused viewport wiggles in d2x)
- GLES2: Fix constant attributes (glVertexAtrrib)
- GLES2: Fix shader instruction bug when a computation uses two uniforms
- GLES2: GLSL "discard" implemented
Known Bugs and Issues
- loops in shaders are not supported
- indirect access to uniforms 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
All required headers and libs are included in the 2013-10-04 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.
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.