|Original author(s)||Axel Davy|
|Developer(s)||Axel Davy & Mesa dev team|
|Repository||github.com/iXit/wine-nine-standalone (Wine driver) and gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/gallium/targets/d3dadapter9 (Mesa driver)|
|Operating system||Linux, Unix-like|
Gallium Nine (or "d3dadapter9") is a multi-GPU DirectX 9 graphics driver for GNU/Linux and other operating systems where it is possible to use the Gallium graphics driver API from the free software Mesa graphics stack. It is mostly useful as a Wine back-end for Windows software using the DirectX 9 API.
The wined3d DirectX 9 rendering path goes▸ ▸ ▸ .
Gallium Nine cuts that down to▸ ▸ .
While Gallium Nine is the faster option for Direct3D 9, it isn't as hugely faster than DXVK as you'd might expect. The difference between Wine's builtin wined3d implementation and Gallium Nine is significant, but it's barely measurably faster than DXVK.
Unigine Heaven Benchmark 4.0
wined3d did not want to run the Unigine Heaven benchmark with DirectX 9 rendering.
Wine 6.7 won't run the Unigine Heaven Benchmark 4.0 in DirectX 9 mode when the
wined3d DX9 to OpenGL translation layer is in use. It works just fine with Gallium Nine and DXVK. The Heaven benchmark lets you choose between DirectX 9, DirectX 11 and OpenGL and the Heaven benchmark does run just fine with
wined3d if DirectX 11 is used. We have therefore included
wined3d using DirectX 11 along-side the DXVK and Gallium Nine results using DirectX 9. We've also included the native Linux version as a contrast since Unigine Heaven happens to be available in a native Linux version. The OpenGL API is the only option in the native Linux version so we used that with the exact same settings.
The difference between
wined3d and DXVK and Gallium Nine is pretty big at 1080p on the AMD test machine. It is a bit less at 1440p, but there's still a gap.
The tiny difference between Gallium Nine and DXVK on the AMD machine at both 1440p and 1080p is the more interesting result. It shows that Gallium Nine has a small performance advantage over DXVK. It is faster, but only by a hair. We had expected to see a larger difference. It is also interesting that the difference between the native Linux version with OpenGL and the Windows version with DXVK is about zero at 1080p with Gallium Nine score slightly higher than both of those. It gets worse for the native Linux version at 1440p, both DXVK and Gallium Nine race ahead of the native Linux version and it's OpenGL rendering path at the higher resolution.
The picture is slightly different on the Intel test machine. It could barely run at 720p Low, so it's not exactly something that is generally usable for games or graphics. Gallium Nine would be the better choice if you were to run games in Wine on a weak Intel iGPU. The gap between the native Linux version using OpenGL and Gallium Nine is much bigger on the Intel machine than it is on the AMD system, though it would be pretty bad to play a game with an average frame rate of both 34.1 and 30.9 at 720p low.
Unigine Valley Benchmark 1.0
The Unigine Valley benchmark is made by the same folks who made the Unigine Heaven Benchmark. Wine's wined3d DX9 implementation doesn't work with that one either, so we used DX11 for comparison to DXVK and Gallium Nine in that one too.
The Wine built-in wined3d DX9 implementation scores about the same at 1080p and 1440p making the gap between it and DXVK and Gallium nine much bigger at 1080p than it is at 1440p.
Gallium Nine wins over DXVK by a clear margin at both resolutions, only to be beat by the native Unigine Valley Benchmark 1.0 version using OpenGL.
Quantum by Outracks vs Nazareth Creations
The Quantum PC demo scene demo by Outracks vs Nazareth Creations does not work with the wined3d DX9 implementation in Wine 6.7 or 6.8. It works fine with both Gallium Nine and DXVK. Both provide pretty equal frame-rates, though Gallium Nine does have a lead.
The data was gathered from
VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay with one second intervals.
Fr-025 : t h e . p o p u l a r . d e m o
Fr-025 : t h e . p o p u l a r . d e m o from 2003 uses DirectX 9 and it works with wined3d, Gallium Nine and DXVK. Fr-025 does not support resolutions above 1080p. The frame-rates it produces on somewhat modern dedicated GPU hardware are rather high.
Gallium Nine isn't doing too good against DXVK in the Fr-025 : t h e . p o p u l a r . d e m o demo scene demo on AMD hardware. It is actually doing worse the wined3d in some areas. The results aren't what you'd expect in this particular demo.
The results differ with the weak and pathetic graphics chip in the Intel i7-5500U CPU. Galliun Nine is a clear overall winner on that machine, though it does have the same strange dips below the other two mid-way through the demo and again towards the end.
Most Windows software using DirectX 9 will work fine with Gallium Nine, but there are some exceptions. Don't expect that everything will just work. You can, as a general rule, expect that anything that works with DXVK will also work with Gallium Nine.
Some software that won't work with the stock Wine wined3d DX9 to OpenGL translation layer will work fine with Gallium Nine. The PC demo scene demo Fr-041: d e b r i s is one example, it works with DXVK and Gallium Nine but it just crashes during the loading screen with Wine's wined3d DX9 implementation.
There is a problem with using the Gallium heads-up display with Gallium Nine.
GALLIUM_HUD=fps works fine with OpenGL applications (ie
GALLIUM_HUD=fps glxgears) but it makes all the DX9 applications in Wine crash if you use Gallium Nine. Don't use
GALLIUM_HUD= with Gallium Nine or you will have a bad day.
Gallium Nine may be worth it if you want a few extra frames per second in DirectX 9 games in Wine. It will be a lot faster than the built-in wined3d Direct3D 9 implementation, but it won't be much faster than DXVK. You will get a few more frames than you get with DXVK, but it's just a few more. More is more, but there is more to this story: There are a few programs (specially PC demo scene demos) that work with DXVK that don't work with Gallium Nine. It is not always the best choice if compatibility is your biggest concern. A few more frames in some games isn't all that if others don't work.. and that is why you may want to keep a separate
WINEPREFIX for it and the DX9 applications that work best with it. You could use a simple shell script if you do not want to type
WINEPREFIX=whatever wine game.exe every time you start a game:
You will need two things to use Gallium Nine:
- The Mesa
libd3dpackage. It is in the repositories of any distribution shipping the Mesa graphics drivers, and that would be all of them. You will likely have to install it, distributions do not tend to include it by default.
- The "gallium-nine-standalone" package available from github.com/iXit/wine-nine-standalone/releases.
The "gallium-nine-standalone" package is probably not in your distributions repositories even if the Mesa
libd3d package is. You can acquire pre-built binaries from github.com/iXit/wine-nine-standalone/releases.
It is also possible to build it from source. There are instructions on github.com/iXit/wine-nine-standalone/wiki/Compiling if you want to go that route. We recommend against it. Compiling it is easy enough if you have the dependencies. There are quite a few of them and you need the development packages for both the x86-64 and i686 versions of the required libraries (wine, d3dadapter9, liblx11, libxcb, libdrm, valgrind, libXau-devel, libgl/libglvnd).
Installing Gallium Nine is easy if you go the easy route and use the release tarball. You can simply extract it and run the
nine-install.sh from within the tarball. You should run
wine ninewinecfg once it is installed, it will tell you if it works or if you are missing something important like i686 version of the Mesa
You may want to create a separate dedicated
WINEPREFIX= for Gallium Nine and DirectX 9 games and applications; the
ninewinecfg does absolutely not provide any easy means of switching between Gallium Nine and DXVK in case some game doesn't work with one or the other.
Choosing Wine Driver
This is where it gets a bit messy and annoying. There isn't any way to easily switch between Gallium Nine and DXVK on a per-game level when you run games.
The best, and seemingly only (perhaps there is a way we are not ware of) way to choose what Wine should use for specific games without annoying work is to create different
WINEPREFIX folders. That's one way that works, you can set a prefix like
WINEPREFIX=$HOME/.wine-nine and install games to the Wine installation you prefer.
It is possible to run
wine ninewinecfg and disable the option. That work work and make sense if
ninewinecfg wasn't broken useless garbage. It is, so that option disables any and all DX9 support, not just Gallium Nine. The reason is that
ninewinecfg will move the existing
d3d9.dll libraries to
d3d9.dll.old and make symbolic links from
d3d9.dll when it is installed and remove the symbolic link and leave it at that when it's disabled. That's obviously not going to leave the end-user with any working DX9 implementation. It would not be a shame if whomever thought that was a good idea gets slammed with 1000mm Ø50mm industrial steel rod.
One solution is to re-install DXVK, but that's not exactly something you will want to do all the time. The better solution is to use a different
WINEPREFIX= until someone comes up with a solution that makes DXVK and Gallium Nine play nice together.