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:
- It was an excuse to work with CodeWeavers' programmers again
- Having a Linux-native HLSL->DXBC compiler has been on every porter's wishlist forever (as Ryan can attest to)
- 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.
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.
See more from me