This is an old revision of the document!


Gallium Direct3D state tracker (gallium nine)

News

05/04/2015 xf86-video-ati upstream now has full DRI3 and Present support! We recommend radeon users to use this.
10/02/2015 We tested new modesetting driver (available since xorg-server 1.17.0) and we recommend AMD users to switch from xf86-video-ati! For better performance :) Beware, it need excessive testing.
01/02/2015 Talk at FOSDEM on Nine status slides
18/11/2014 Nine/st got into upstream Mesa-3D! I'd like to thank everyone for their hard work on coding, buildsystem, testing and helping new users! Thank you guys!

Project Information

What is difference between classic wine and wine enhanced with Nine support? The answer is simple - performance. When we play most DirectX 9 games, we want the highest performance possible. Sadly, wine loses a lot of Direct3D9's speed through the inefficent translation of HLSL and D3D9 calls to OpenGL.

But we can do better! We can build on top of the Gallium framework which is part of the Mesa-3D library. It allows us to expose Direct3D 9 support!

Real numbers?

Game Portal
cpu: Intel i5-3210M @ 2.50GHz; gpu: AMD HD 7730M
60 fps Ubuntu 14.10 - Native
63 fps Arch Linux* - wine
85 fps Windows 7
89 fps Arch Linux* - wine with Nine support
* Arch Linux with llvm SI scheduler + dma copy enabling patch

Generally also works better in CPU limited scenarios.

If you want to watch development and talk about Direct3D, join us on #d3d9 on freenode.net. Channel logs are available here.

The whole package needed to use native Direct3D 9 in wine consists of:

  • Mesa-3D library (d3dadapter)
  • Wine (d3d9.dll.so, gdi32.dll.so, user32.dll.so, wineps.drv.so, winex11.drv.so and winecfg.exe.so)

Usage

First, you need to allow native Direct3D 9 in wine!

  1. Run winecfg
  2. Select the Graphics tab
  3. In the 3D Acceleration group select Prefer native Direct3D 9

If the 3D Acceleration group is missing, you do not have the patched Wine!

Now you may want to try your favorite game!

If you want see CPU load and FPS, use Gallium HUD. It provides part of Fraps' functionality, known from Windows. (for 4 core configurations)

export GALLIUM_HUD="cpu0+cpu1+cpu2+cpu3;fps"

Installation troubleshooting

Try to run a simple DX9 application from terminal and check the logs. You should see something very similiar to this image below. If you see:

  • Native Direct3D 9 is active. (green), then everything should be fine,
  • Native Direct3D 9 is disabled. (orange), enabling D3D9 acceleration is described in Usage section
  • Native Direct3D 9 will be unavailable. (red) - read the error printed above this message. Probably your Mesa is miscompiled or different error occurred.
  • Wine source code has been compiled without native Direct3D 9 support. (red) means that you didn't have Mesa with Nine support at wine compilation time and you forgot to pass –enable-d3dadapter9 to the wine configuration (re-read Build section)

How can I help?

This project is completly open source and everyone can help at least a little. Currently, we looking for

  • Programmers with knowledge of:
  • Game testers with:
    • The ability to write detailed bug reports,
    • Common Linux knowledge, and
    • Basic debugging skills
  • Distribution packagers
  • Help desk / support who can:
    • Provide a friendly approach to helping newbies
    • Motivate newbies to participate

What we can offer?

  • A good feeling from improving code used by you and many others
  • Personal growth and improving your Linux knowledge
  • A friendly community (check out our IRC!)
  • Participating in interesting project
  • A good reference into your resume/CV

Roadmap

  • Get rest of Nouveau patches into upstream.
  • Test Nine with Longene
  • Get Wine patches to upstream or/and packagers