Direct X On Linux Using The Open Source Driver?

amd-tux

You read it correctly, Direct X directly interacting with the Gallium open source driver!

About

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.

video

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.

Interview

rootgamer_say: Can you tell us something more about the presentation? I got a little confused about all the technical details?

Tiziano: About what exactly, the clock frequencies?

rootgamer_say: More about the ‘native’ part, how you used Gaillion 3D, to put D3D direct to driver implementation?

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.

rootgamer_say: Differences between games, maybe?

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 )

rootgamer_say: Ok, I didn’t know that.

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.

rootgamer_say: Like LXC containers over puppet > having it closer to the core of the system makes the most of hardware.

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.

rootgamer_say: But it requires the use of the open source driver instead of the proprietary driver, therefore implementation isn’t caught upstream?

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

rootgamer_say: 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

rootgamer_say: How does it compare to native games? Some games really require closed-source to get playable performance, on an avg. system.

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.

rootgamer_say: 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.

rootgamer_say: That would hold people back; open-source > closed, need to kill your sessions etc. It’s not really user friendly but well worth checking out on a test-rig

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.

rootgamer_say: haha, yeah can be a ‘surprise’ experience.

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.

rootgamer_say: If this works out right, just might be next lever of ‘remote / emulated gaming’

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.

rootgamer_say: @che; sounds like we got some testing ahead

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

Che: Impressive

rootgamer_say: I wonder how this plays out with ‘budget gaming hardware’ to get ‘high end performance’?

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.

rootgamer_say: Fermi(?)

Tiziano: http://nouveau.freedesktop.org/wiki/CodeNames/

rootgamer_say: Guess i’m good for it over here

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.

rootgamer_say: (laughs)

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.

rootgamer_say: 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.

rootgamer_say: Just a side note, is this implementation something like AMD mantle?

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!

Tiziano: Bye

Source

For more information you can find Tiziano on G+ and Youtube:

  

flattr this!

SHARE THIS POST

  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg
  • Technorati
Author: Kereltis View all posts by
Linux advocate, born in Liverpool, grew up in Cork City Ireland and currently living in Corvallis, Oregon. I love all things Linux, my favorite distro being Ubuntu followed closely by Kubuntu and Linux Mint (Cinnamon and KDE). As far as I'm concerned Linux is the future of gaming. Lets make the world as open and transparent as we can!

3 Comments on "Direct X On Linux Using The Open Source Driver?"

Leave A Response

You must be logged in to post a comment.