1 | Gallium Nine
|
---|
2 | ============
|
---|
3 |
|
---|
4 | The Gallium frontend, which implements Direct3D 9.
|
---|
5 |
|
---|
6 | Nine implements the full IDirect3DDevice9 COM interface and a custom COM interface called ID3DAdapter9, which is used to implement the final IDirect3D9Ex COM interface.
|
---|
7 | ID3DAdapter9 is completely agnostic regarding the window system code, meaning this can be provided by wine, Xlib, Wayland, etc.
|
---|
8 |
|
---|
9 | Gallium Nine is commonly used in conjunction with `Wine <https://www.winehq.org/>`__.
|
---|
10 | `Gallium Nine Standalone <https://github.com/iXit/wine-nine-standalone>`__ is the standalone version of the Wine parts of Gallium Nine which makes it possible to use it with any stock Wine version. It's simple to install through `Winetricks <https://github.com/Winetricks/winetricks>`__ with ``winetricks galliumnine``.
|
---|
11 | Aside from Wine, Gallium Nine works well with `Box86 <https://ptitseb.github.io/box86/>`__.
|
---|
12 | Can be used via `Zink <https://www.supergoodcode.com/to-the-nines/>`__ even on the `Vulkan API <https://en.wikipedia.org/wiki/Vulkan>`__.
|
---|
13 |
|
---|
14 | In the majority of cases this implementation has better performance than Wine doing the translation from D3D9 to OpenGL itself.
|
---|
15 |
|
---|
16 | It's also possible to use D3D9 directly from the Linux environment. For tests, demos, and more details, you can see `this repository <https://github.com/iXit/nine-tests>`__.
|
---|
17 |
|
---|
18 | Build
|
---|
19 | -----
|
---|
20 |
|
---|
21 | Beware: Most Direct3D games are 32-bit, and thus need a 32-bit version of Mesa.
|
---|
22 |
|
---|
23 | .. code-block:: console
|
---|
24 |
|
---|
25 | $ meson configure \
|
---|
26 | -D gallium-nine=true \
|
---|
27 | -D dri3=enabled \
|
---|
28 | ...
|
---|
29 |
|
---|
30 | Paths
|
---|
31 | -----
|
---|
32 |
|
---|
33 | You need to point wine-nine-standalone to the location of ``d3dadapter9.so``.
|
---|
34 | If you use distribution packaged Mesa, it should work out of the box.
|
---|
35 |
|
---|
36 | There are three options (sorted from permanent to temporary):
|
---|
37 | - compile Wine Nine Standalone with ``D3D9NINE_MODULEPATH`` pointing to your local library
|
---|
38 | - set ModulePath of Software\Wine\Direct3DNine in the wine registers
|
---|
39 | - ``$ D3D_MODULE_PATH="$MESA_INSTALLDIR/lib/d3d/d3dadapter9.so" wine ...``
|
---|
40 |
|
---|
41 | Run
|
---|
42 | ---
|
---|
43 |
|
---|
44 | Before running your application in Wine, verify that everything works as expected by running:
|
---|
45 |
|
---|
46 | .. code-block:: console
|
---|
47 |
|
---|
48 | $ wine ninewinecfg
|
---|