Internal Multi-Threading Arrives For Gallium3D's Direct3D 9 "Nine"
Written by Michael Larabel in Mesa on 7 December 2016 at 06:50 PM EST. 41 Comments
Prolific Gallium Nine developer Axel Davy has published a massive patch-set today implementing support for internal multi-threading in this Direct3D 9 state tracker.

This internal multi-threading implementation is similar in concept to Wine's Direct3D Command Stream Multi-Threading (CSMT) work. The Gallium Nine Internal Multi-Threading tries to offloading all of the Gallium Nine calls and other work into a worker thread.

By punting more of the work into a worker thread, the performance should benefit when using Gallium Nine paired with a supported version of Wine. Getting this internal multi-threading working took a lot of code refactoring and was implemented over the course of 84 patches and add nearly four thousand lines of new code. The patches also attempt to optimize the performance by queuing commands into pre-allocated queues and then making those visible to the worker thread only when there's a lot of commands queued.

For now this state tracker only enables the internal multi-threading when used with the R600 and RadeonSI Gallium3D drivers but can be manually forced via csmt_force=1 (or disabled via 0) and requires the drivers to be thread-safe.

This massive patch-set for boosting the Gallium Nine performance can be found via Mesa-dev.

On top of those 84 patches for internal multi-threading, Axel Davy also sent out 36 other patches in a separate series of various fixes. Besides fixes is also new options to choose the behavior of the swap-chain discard mode. Those details here.
Related News
About The Author
Author picture

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 or contacted via

Popular News This Week