Wednesday, December 22, 2021

CodeWeavers is helping make DirectX 12 Windows games playable on Linux

CodeWeavers CrossOver is one of the most popular ways to run Windows applications on other operating systems. It combines the excellent work of the open-source Wine project (of which CrossOver’s developers contribute code to) with an easier-to-use interface and front end. CodeWeavers released CrossOver 21 back in August, and now the company has shared details about its work to bring modern game support to Linux and Mac.

Many recent Windows games (and other graphics-heavy applications) rely on DirectX 12, the latest version of Microsoft’s DirectX graphics library, which uses lower-level APIs to achieve faster performance. DirectX is only available on Windows (and Xbox consoles), so the Wine compatibility layer uses the VKD3D graphics library to execute Direct3D calls on top of Vulkan (which is available on Linux, Windows, and other platforms). The Vkd3d library is primarily developed by Valve Software for its Proton compatibility layer, and the rapid progress on VKD3D is the main reason why so many Windows games are now playable on Linux.

Even though CrossOver already includes VKD3D, CrossOver doesn’t officially support DirectX 12 games while its developers figure out a few performance issues, according to a new blog post:

CrossOver uses VKD3D to run DirectX 12 games. VKD3D is a 3D graphics library built on top of Vulkan. Currently, lots of work is being done to improve VKD3D performance. With the help of the Vulkan descriptor indexing extension, which allows for functionality similar to DirectX 12 descriptor heaps, Vulkan descriptors are written less often and far less GPU memory is used. As a result, VKD3D can support games that use enough descriptors to require resources from Tier 2 and Tier 3 hardware.

CrossOver plans to officially start supporting DirectX 12 games and applcations on Linux in 2022, with the future release of CrossOver 22. However, the company isn’t so sure when VKD3D will be functional on Mac. Apple doesn’t support Vulkan at all on macOS (or iOS), instead asking developers to use its Metal graphics library. That’s a problem for CrossOver, as the blog post goes on to say:

In general, Metal does tessellation differently, and is missing geometry shaders and transform feedback. Specific to DirectX 12 and Metal, there is an issue with limits on resources. Generally, games need access to at least one million shader resource views (SRVs). Access to that many SRVs requires resource binding at the Tier 2 level. Metal only supports about 500,000 resources per argument buffer, so Tier 2 resource binding isn’t possible. Metal’s limit of half a million is sufficient for Vulkan descriptor indexing, but not for D3D12. This limitation means CrossOver Mac can’t support Tier 2 binding and therefore a lot of DirectX 12 games will not run.

Despite these challenges, CodeWeavers is hopeful DirectX 12 games and applications could be functional on Mac with the future CrossOver 23 update. New major versions of CrossOver usually happen on a yearly basis, so that would likely be in 2023.

Even if you don’t use CrossOver, most of the compatibility improvements developed by CodeWeavers are submitted back to the Wine project. That means the company’s work could help improve Windows games on Lutris, the Steam Deck console, PlayOnLinux, and other projects based on Wine. That being said, once full DirectX 12 support arrives, CrossOver could be a compelling choice for playing Windows games on Linux outside of Steam.

The post CodeWeavers is helping make DirectX 12 Windows games playable on Linux appeared first on xda-developers.

HostGator Web Hosting

0 comments:

Post a Comment