You read it correctly, Direct X directly interacting with the Gallium open source driver!
Last week we had an opportunity to speak with Tiziano Bacocco (an open source, electro Guru from Italy) about the future of the Gallium driver (open source AMD driver) and how it is possible to have Direct X interacting directly with the driver instead of having the overhead of the OpenGL conversion. It was very interesting from a gaming perspective even if it is not ready for prime time just yet.
The big difference is, that normally wine emulates Direct X 9 with OpenGL calls, it has tons of code to translate each DX 9 API function to the equivalent OpenGL calls.
Tiziano: About what exactly, the clock frequencies?
Tiziano: The big difference is, that normally wine emulates Direct X 9 with OpenGL calls, it has tons of code to translate each DX 9 API function to the equivalent OpenGL calls.
Tiziano: That’s because with proprietary drivers you can’t have the necessary driver side APIs ( most of DX9, DX10, DX11 is implemented at driver side, not by Microsoft )
Tiziano: But with open source drivers the story has changed , you have free access to an intermediate API called Gallium. That API is something between bare metal, and stuff like directx or opengl, so with that API, Christofer Bullimer, implemented a directx9 state tracker, that allows skipping all the dx9 -> opengl conversion and directly interacts with the graphics drivers.
Tiziano: So you have eliminated completely the performance loss and also bugs introduced by emulation layer.
Che: Cutting out the middle man so to speak.
Tiziano: One of the remarkable enhancements is that shadows on Crytek games started working just to make an example.
Tiziano: Yes, since it is still very experimental, it is not shipped by default, you have to compile it from a specific mesa repository and it cannot work with proprietary drivers because they do not expose Gallium API.
Che: If your video is anything to go by things are looking up for the future though?
Tiziano: Yeah, it’s not ready for the end users for now. But now that reclocking started working on Kepler cards at least, you get performance levels that were not even imaginable before. There are many games that still don’t work, and some with specific graphics cards can cause GPU lock-up requiring full reboot. I know also that it’s a planned DX10 and DX11 state tracker as soon as OpenGL 4.x compliance is reached by the gallium drivers
: Changing the ‘core’ of my system to gain maximum performance from an individual game isn’t something I look forward to, like switching driver x / y to gain the most out of one game… however, current Linux gaming development is impressive. Soon we will get a PS4 in a Raspberry Pi 3
Tiziano: Well, most mainstream games work very good with gallium nine, like Skyrim, World of Warcraft and Starcraft
Tiziano: Last time I tried, World of Warcraft under wine, it was faster with gallium-nine and d3d9 mode than with opengl mode. Keep in mind also that this works on Radeon too, and on Radeon, full reclocking is working.
: I recall WoW being better with d3d compared to opengl, however, the game is well suited and wine made some optimizations. I had my fair share of ati/amd gpu .. “issue’s”, I’m not touching that again for now. Thank you for this insight, it has been very helpful. Do you mind if we embed your video into a post? With reference of course?
Tiziano: If you want to, it’s useful if you publish it anyway, it may attract more developers that have time to work on it. There’s also crysis 2 that except for an HDR glitch on very lit areas, works very good with ultra settings.
Che: It has definitely made me think some bit positive about AMD again. Thanks for your incite.
Tiziano: The main problem is with Fermi NVIDIA cards, the open source drivers are completely crap for now, no reclocking and boot frequencies are even 10 times less than top.
Tiziano: Well actually, at least in my experience with open source drivers, you use game X and you get a crash, you use it again, and it is another crash, you don’t use it, no crashes.
Tiziano: With proprietary drivers it’s more random, that’s why i have 2 linux installations, and for most stuff I use the one with open source drivers.
Tiziano: I use closed source drivers only when i need to use CUDA or opencl, or opengl 4.x games, other stuff, incl HL2 based games and HL2 itself, left 4 dead 2 etc etc, work perfectly fine, and with reclocking on kepler they are more than playable.
Che: Definitely, I still have my AMD cards, glad I kept them now. haha
Tiziano: There’s also tesseract that with a reclocked GTX 670, to 0a perf level, it can reach more than 100 fps at 1080p
Tiziano: As long as it’s kepler architecture it may work well.
Tiziano: With Fermi it’s not even worth trying, rendering is ok, but performance is completely slow, you can’t even reach 10 fps on most games.
Che: Fermi is the Nvidia 400 and 500 series cards
Tiziano: Work is planned on Fermi too anyway, also another thing, on most kepler cards, 0f performance level won’t work, and will lead to screen corruption and freeze. If it crashes, try 0a.
Tiziano: To try reclocking these cards you have to use Linux 3.16-rcX too.
Tiziano: There’s also this about dx9 , but on that radeon it is going a bit slow, it is still many times better than wine with OpenGL.
Tiziano: This one too, but here it was running at 1/10 of the top clock frequency. These videos are recorded with a phone, not because I do not know about game recording software (I’ve written an OpenGL one myself too, like fraps), but because there’s no dx9 capture software for Linux.
: Ironic isn’t it; you use an open-source implementation to run closed-source games to achieve better performances compared to proprietary ones but switch back to play open-source with propriety Linux, gotta love it!
Che: I can’t wait for the day open source drivers are the norm and we no longer need to worry about installing drivers.
Tiziano: The main problem with proprietary drivers is that KMS is completely broken, and they often have insane suspend / resume time. Gallium, yes, theoretically, you could write a game that uses it directly.
Che: Thanks again, Tiziano!
For more information you can find Tiziano on G+ and Youtube: