Confused on Steam Play and Proton? Be sure to check out our guide.
We do often include affiliate links to earn us some pennies. See more here.

FNA gets Direct3D 11 support on Linux using DXVK and vkd3d

By - | Views: 21,269

Some fun for game developers and game porters looking at Linux and Steam Deck here, as FNA has released a major upgrade that has early support for Direct3D 11 on Linux. FNA powers quite a lot of games, and is used to help port games over to Linux as well.

In the latest FNA release 23.05 it brings Linux support for Direct3D 11 rendering in Alpha. How? Making use of DXVK-Native (which is now just part of DXVK itself) and vkd3d. You might be wondering, and I certainly was - why? Well, developer Ethan Lee wrote on their blog-thingy:

I was really excited to help with this for a few reasons:

  1. It was an excuse to work with CodeWeavers' programmers again
  2. Having a Linux-native HLSL->DXBC compiler has been on every porter's wishlist forever (as Ryan can attest to)
  3. It was also an excuse to start helping Joshua Ashton with making D3D9/10/11 a runtime provided by operating systems, as well as the Steam Runtime

While Valve still isn't prioritizing native, that hasn't stopped others from working on it independently - it's this cooperation that allowed the FNA team to release what I'm badly naming "The FNA3D D3D11 Linux Alpha"! Available on the FNA website, this is a supplementary archive for fnalibs.tar.bz2; by updating fnalibs and bundling linux_d3d11, you can now pass /gldevice:D3D11 as a launch arg, and it will use dxvk with the native Linux binaries. Is it any better than our native OpenGL/Vulkan renderers? Maybe! Is it still cool even if it isn't better? Sure! The main goal of this feature is that it showcases what's possible for studios using D3D that want to make native versions, since somebody needs to tell everyone that this is an option, and I don't see anyone else doing that, so... here we are.

Pictured above is Streets of Rage 4, a shot taken from Lee's post about it showing it running with this change to FNA. Below a bunch of screenshots Lee further explained once their TODOs on it are done:

That will effectively fulfill my vision for what all of the recent DirectX work could be doing for native: Provide a built-in Direct3D runtime and HLSL compiler in distributions, just as we already do for other graphics libraries and shader languages, so that developers can target native Linux binaries without having to statically bundle what amounts to an entire graphics driver inside their game. The samples above may not look super cutting edge, but even small developers can make use of these features to improve energy efficiency for the new handheld PC craze, as well as improving on the usual performance and stability concerns.

And of course, I'm still supporting OpenGL as always, and the FNA team is still heavily invested in SDL_gpu, but this has been a fun thing to work on in between SDL_ActionSet work and some other console projects that I've been working on in the background. I hope the work will help continue to build a platform that developers feel confident shipping native games on, and maybe Valve will get excited about it too!

It will certainly be interesting to see what becomes of this, and perhaps if more developers look towards something like DXVK and vkd3d it could help bring down costs when it comes to porting. Although for bigger developers that largely depends on what happens with the Steam Deck and Linux desktop user share over time, it has to be worth it for them.

Article taken from GamingOnLinux.com.
17 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. Find me on Mastodon.
See more from me
3 comments

Kuduzkehpan May 2, 2023
Good job for developers as making microsoft exclusive graphic apis avail in some form of apis in linux as natively amazing work to do. At the other hand while there is Vulkan which is beyond both OpenGLx and DirectXx i don't think this dx native libraries will make a difference or huge impact on linux gaming era.
Still im looking forward to see companies using vulkan api for all devices and multicore GPUS in future as VULKAN capable of it while both dx and opengl are not.
rea987 May 2, 2023
Well, another reason for Supergiant to port Hades to Linux. But ofc they won't...
omer666 May 3, 2023
That's nice to see because DXVK is not tied to Wine and Proton, and can be used very efficiently for native gaming. Allowing devs to port their games natively without the hurdle of rewriting their graphic stack or learning yet another language -- especially when it's a solo project -- is valuable.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.