Sunday, May 19, 2013

gallium a3xx es2gears

So, I've been working on the freedreno gallium support for adreno a3xx  for the past few weeks or so, and now it is starting to take shape:



 
 The full video here.

The code is on the a3xx branch on github.. still has a ways got go before I'm ready to go upstream with it, but now we're getting into the fun bits :-)

Special thanks to Benjamin Tissoires for getting the touchscreen going for me on the nexus4.


Sunday, April 14, 2013

a320, first renders

A while back, I got my shiny new nexus4 in order to start playing with the new a320 adreno gpu.  It turns out, there are some quite significant changes in the new generation, in particular new shader ISA and all the registers around shader setup.  Other registers are mostly shuffled around, with a few new registers for new features (like MRT) and a few tweaks here and there.

There is quite a lot more flexibility in the shader ISA (thank-you opencl), and some nice changes like moving vertex fetch out of the shader and a lot more flexibility in the positioning of outputs/varyings.  Although as a result there was more that needed to be figured out to setup the shader related registers compared to a2xx.

At this point, I'm working with simple "fdre-a3xx" tests.  Basically libfdre (freedreno reverse engineering) gives a very simplified gl-ish API, with shaders written in assembly, rather than full on GLSL compiler.  I've got a pretty good shader assembler/disassembler, and cmdstream parsing utilizing envytools/librnn for parsing the register values.  There is still some more work to do at the fdre level (depth, stencil, textures) before work on the gallium driver can start, but things are progressing well.








Tuesday, March 5, 2013

Fedora 18 + gnome-shell + Freedreno

After fixing a handful of bugs, and adding support (still in a slightly hacky way) for some desktop GL (1.4) features (namely, GL_QUADS), I've got gnome-shell working with freedreno:


Full video here

I've also made a sort of fedora F18 installer for the touchpad, for anyone out there who wants to give it a spin:


Note that gnome-shell itself is not installed by default in the arm fedora builds.. so, 'sudo yum install gnome-shell'

Friday, February 8, 2013

fosdem demo

Last weekend was fosdem, where I showed a few more things working on freedreno (compiz, q3a).  The recording of the talk is provided by phoronix.  Although unfortunately the mic was closer to the audience than me (and I'm not really a loud speaker), and the camera remained pointed at the projector while I was showing the demo, so you miss the exciting bits.

So I re-ran the demo and captured it with my advanced cinematic skillz, and without the backlight hickups which plagued the original demo (but had nothing to do with freedreno... have I mentioned before that drivers/video/msm is made of fail?).

Full video here.

I still need to fix support for mip-map textures (which you may have noticed in the q3a part), and there are a couple rendering bugs with the unity plugin in compiz, but at least the other compiz plugins I've tried so far seem fine.  Until now I have not put much (or really, any) focus on performance and there is definitely some low hanging fruit on the performance front.  Unfortunately some of the issues, like proper synchronization between xorg and gl/dri2 client, and flipping rather than doing fullscreen presentation blits, will I think require a proper drm kernel driver.  Although I suspect there is room for some compiler optimization and a few other things.

Saturday, January 19, 2013

freedreno gallium update

Just a quick update, and a sneak-peak at what is in store for FOSDEM.  The freedreno gallium driver has made a lot of progress since the last post (sorry, been too busy hacking to blog about it).  But now finally xbmc is working with freedreno:


Full video here.

Special thanks to Ricardo Salveti for building a working version of xbmc for 12.10.  You can find it in his PPA.

Monday, December 10, 2012

es2gears!

Another quick update, since it has been a while.  I've been working for the last month or so on a gallium driver for freedreno, and now it is finally showing signs of life with es2gears:



There are still a lot of little missing pieces (textures, not translating a lot of tgsi shader opcodes, and it won't work for anything that isn't glClear()ing the color/depth/stencil buffers each frame.  Although these shouldn't be too hard to add, just takes time.

The work-in-progress mesa code is on github
git://github.com/freedreno/mesa.git
 

Tuesday, October 23, 2012

freedreno update

Just a quick update, since it has been a while and I haven't had time to update the old blog:
  • I managed to get stencil buffer working just before XDC, a bit over a month ago.. no exciting looking demo, but the stencil test (which is based on the stencil example in opengles-book-samples) is now working
  • Since then I have been starting to get things into shape in order to start on a gallium driver.  I've written a libdrm_freedreno module to include the common code for interfacing with the kernel driver, needed by xf86-video-freedreno, fdre, and the eventual gallium driver.  Eventually we will need a proper DRM kernel driver, but libdrm_freedreno abstracts this well enough that I can concentrate on the 2d/3d userspace parts.  The eventually plan is that when there is a proper DRM kernel driver (supporting a pushbuffer type interface, and synchronization between 2d and 3d pipes), libdrm_freedreno will be the point where we support talking to either the new driver or the existing QCOM kernel driver.
  • I've fixed the problems that were preventing batching in the 2d driver, so now the performance is starting to be decent for xf86-video-freedreno.  There is still some room for improvement (we fall back to sw for some sorts of blits that the hardware should be able to support, but libC2D2 does not, primarily blits with mask surfaces.. but I think I understand enough of the 2d registers to implement the missing blits.  And also there is probably some room to optimize the cmdstream a bit for batches of blits.)
  • I've implemented DRI2 support in xf86-video-freedreno and fdre, so now we have: dri2 lols cats:

So the next step, which I should hopefully be starting on in a week or two is the gallium driver!  Of course this is still going to be a lot of work, but things are coming along nicely so far :-)