Direct3D 9 Support Might Land Within Mainline Mesa 3D Drivers

Written by Michael Larabel in Mesa on 18 October 2014 at 08:25 AM EDT. 47 Comments
It looks like we could see the Direct3D 9 (Gallium3D Nine) state tracker land within Mesa! This state tracker can be used for accelerating D3D9-using Windows games via Wine and other purposes. The Gallium3D Nine patches are called for review as of this Saturday morning with ambitions of being merged to master.

Going back four years there was the Direct3D 10/11 state tracker that ended up getting merged into Mesa but it was ultimately removed since the D3D10/11 APIs weren't fully implemented, the code was buggy, and ultimately it went unmaintained with little usage by the community. This "Gallium3D Nine" work meanwhile is implemented much better, has a bit of a community following with many running the code in conjunction with a patched Wine copy, etc. The results have been very positive and proving to be much faster for Wine gaming than running through Wine's Direct3D to OpenGL translation layer.

Tests by community members riding these Mesa and Wine patches have found using this Gallium3D state tracker of D3D9 can allow the open-source Radeon driver to run faster than AMD's Catalyst, Grand Theft Auto running great on Linux, etc. This modern D3D9 Linux implementation for Gallium3D drivers has been around for more than one year in development as an external Mesa repository but might now be merged to master.

Reporting back in August, the D3D9 support stands good chances of being merged compared to the older implementation that was dropped. Marek Olšák of AMD explained, "I guess it can be merged into Mesa now. When the D3D1x state tracker was merged, it was in an unusable state. Nine is in a lot better state than that. Also, Nine seems to have users now, which makes it an important project."

As of a few minutes ago on the Mesa mailing list, the Gallium3D Nine patches were posted for review. David Heidelberger posted the sixteen patches to "Famous Gallium3D Nine". David explained, "At this moment is Gallium Nine in good shape. There is plenty application running well with it and performance is very good. At this moment we have users, contributors and support for different dist."

The Direct3D 9 support in Gallium3D works best with the open-source AMD Radeon (R600/RadeonSI) drivers while the open-source NVIDIA (Nouveau) support still requires some patch work and for the Intel "ILO" Gallium3D driver there's also one other patch needed for its support.

This Direct3D 9 Gallium3D support amounts to over thirty-three thousand lines of new code to Mesa, which would mostly benefit Wine users. It's unlikely to see any Linux game/app developers start trying to target Direct3D directly given that this support will only work for Gallium3D drivers -- a subset of open-source Linux GPU drivers given that the official Intel driver is still on a "classic" design and this doesn't cover the proprietary AMD/NVIDIA drivers. For this reason too is why Wine developers haven't been interested in merging support to use this state tracker since it only covers part of their Linux user-base. Regardless, interesting times ahead for Linux graphics.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week