Visucore Blog

Python, Parallel Processing, Graphics, Open Source, Embedded Systems, Game Development

More etna_viv news

written by wladimir, on Aug 28, 2013 8:09:00 PM.

Another update on the Etna 3D driver for Vivante GPU cores, along with screenshots of games that now render successfully :0)

Currently supported GPUs: GC600, GC800, GC860, GC880 (others may be supported but these have been tested). GC2000 is currently not supported because it has multiple pixel pipes (see this irc log for details).


AAAA

What has been done

  • GLES1 (for the most part) and GLES2 support
  • Shader compiler, with support for fixed pipeline emulation shaders from GLES1
  • Buffer management, 2D and cubemap textures, mipmap generation
  • Fallbacks in Mesa for the devices that only supports single vertex buffer or no 32-bit indices, and lowering for TGSI instructions LRP and POW

D2X (Descent 2 rebirth)

What has to be done (in no particular order)

  • Bugfixes for remaining corruption issues
  • Optimization: mainly a smarter shader compiler, and implement performance features present in the blob driver but currently disabled in etnaviv
  • An Xorg EXA (2D) driver
  • Interaction with dma buffers and drm (kernel code for interaction between vivante kernel driver and dma buffers is supposed to exist somewhere, at least for Marvell Dove)
  • Get stuff merged upstream

Hurrican

Any help is welcome (props to Zear again for the screenshots).

Comments

  • Thanks for the great work! Glad to hear someone is busy working on Vivante support for Mesa.

    Do you intend on writing a driver for GC2000, or are you abandonning the effort? You make it seem like you're not going to go there, which is a bit... Disheartening. :(

    Comment by Joe — Sep 12, 2013 5:53:02 AM | #

    • I haven't abandoned GC2000, but it's not exactly on top of my list either. I get most interest and support from the direction of GCW Zero (GC860) so that's where I am spending my efforts. Getting the driver to support multiple pixel pipes (the only thing holding back GC2000 support) likely involves quite a few code changes but isn't rocket science either. If anyone is interested in contributing there, be sure to contact me. Note that the 2D tests already work on GC2000 :-)

      Comment by wladimir — Sep 12, 2013 3:45:00 PM | #

      • Glad to hear it! Are there other people working on etnaviv for GC2000? How daunting is the task? I would be interested in trying but I don't know if my skill set/experience is advanced enough.

        Especially with the wandboard quad out in the wild, I'd love to see Mesa drivers at least support basic 2D/3D (like how r600g was when it was first released), just so that we can have decent performance without loading a blob.

        Comment by Joe — Sep 13, 2013 4:34:25 PM | #

        • There used to be someone working on GC2000 support but he disappeard mysteriously off the face of the earth. It's so incredibly daunting that it drives people to madness and beyond.

          Kidding... It shouldn't be too daunting; the main work is supporting two new tiling formats for resources, multi-tiled and multi-super-tiled, and computing and submitting a pointer per pixel pipe when rendering (the reverse engineering work is done, it just needs software support). More difficult would be to support mipmap generation (render to texture with mipmap generation), but basic rendering should be fairly easy.

          The 2D driver would be (mostly) the same as for GC800 et al, and the 2D engine is figured out (there are some tests in native/test2d), just no one started working on a driver yet.

          Comment by wladimir — Sep 14, 2013 1:33:15 PM | #

          • Ok, I was curious. I haven't done anything that low-level, but it's something I really want to see done. It'll be especially nice if the 2D driver is almost in place... What is the state of the 3D driver/design?

            And what would you suggest as reading material, if I was interested in getting up to speed with this kind of stuff?

            Comment by Joe — Sep 20, 2013 5:24:26 AM | #

            • There is some scattered hardware documentation in doc/hardware.md (and other files in doc), and the detailed register maps (which also have some documentation here and there) are in the rnndb directory. Also there are some posts on this blog that reveal more. But if you have specific questions you can always ask me (preferably through mail or freenode IRC #etnaviv).

              Writing user space GPU code is not that low-level. In principle the driver follows the same pattern as other gallium drivers. It processes gallium draw commands and state updates, and build a large queue of uint32_t's with the GPU commands. The low-level details are handled by the kernel driver and libetnaviv (the interface to the kernel driver). I suggest just playing with the code a bit, maybe stepping through some parts with gdb and/or running with the debug flags enabled (ie export ETNA_DEBUG="msgs frame_msgs resource_msgs compiler_msgs linker_msgs").

              Some details about the current state of the ES 1/2 driver are here: www.gcw-zero.com/files/etnaviv-2013-09-13.html though "known bugs and issues" is already outdated.

              Comment by wladimir — Sep 20, 2013 8:21:00 AM | #

  • Thanks for your great work! I am really interested in this project. I notice that you had progress on 3D driver for GC2000. Does it still have any bugs/missing features for GC2000? What can I do for 3D driver of GC2000? I have little knowledge about GPU driver, can you shed light on how to warm up? Hope I can catch up with your kindly help.

    Comment by mike — Dec 19, 2013 1:24:55 PM | #