Vkd3d 1.2 Is Released

From LinuxReviews
Jump to navigationJump to search
Microsoft-logo-2020.png

The Wine team has released a new major version of their vkd3d DirectX 12 to Vulkan translation layer library used by Wine. Two years of hard work allows this vkd3d release to let you launch Mario Kart DX12. That is an improvement since vkd3d 1.1. You can now see the start menu, but you can't actually play the game. There's also support for tessellation shaders, stream output and a now publicly available libvkd3d-shader library in vkd3d 1.2.

written by 권유리 (Kwon Yu-ri). published 2020-09-24last edited 2020-09-25

Mario Kart DX12 Wine vkd3d 1.2.jpg
Mario Kart DX12 failing to run in Wine using vkd3d 1.2.

Vkd3d is a general-purpose library with a Vulkan DirectX 12 implementation. It can be used by any piece of software that wants to be able to use the DirectX 12 API and have those API calls translated to Vulkan. It is, to most GNU/Linux users, mostly interesting as a library leveraged by Wine to run DirectX 12 Windows software on GNU/Linux.

Mario Kart DX12, available from itch.io, is a "Mario Kart styled game" implemented using Direct X 12. It uses something called the ThICC Engine. It's open source in the sense that you can study the source code but there is no mention of any free software license.

Mario Kart DX12 will simply refuse to even show the games start menu if you launch it with Wine 5.17 using vkd3d version 1.1. It'll immediately crash and burn. That has improved greatly with vkd3d 1.2: The game can now launch and show a fine menu where you can choose between Cup, Race and Exit thanks to the many improvements in the latest vkd3d library.

Mario Kart DX12 will start a "demo" race, all on it's own, if you leave the launch screen alone for a while. And it works, you can watch Mario race around without Mario Kart DX12 blowing up in your face.

Mario Kart DX12 Wine vkd3d 1.2 demo.jpg
Mario racing around in Mario Kart DX12.

Trying to actually play Mario Kart DX12 with Wine 5.17 using vkd3d 1.2 is a different story. You can choose track, and kart, but that's it.

Mario Kart DX12 Wine vkd3d 1.2 such page fault.jpg
You can't actually play Mario Kart DX12 with Wine 5.17 using vkd3d 1.2.

All you get to see when you try to start a race using any of the available tracks in Mario Kart DX12 is this fine error:

Unhandled exception: page fault on read access to 0x00000004 in 32-bit code (0x42bfd003).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:42bfd003 ESP:0031ef10 EBP:431225bc EFLAGS:00010202(  R- --  I   - - - )
 EAX:61c47860 EBX:61c47860 ECX:714e694c EDX:00000000
 ESI:714e6920 EDI:61c47860

The simple fact that games like Mario Kart DX12 still fail to run with vkd3d 1.2 does not mean the developers haven't made significant improvements since vkd3d 1.1 was released two years ago. Just get a load of this list of "Newly implemented Direct3D 12 features" from the dkd3d 1.2 change-log:

  • Multi-sampling.
  • Reserved resources.
  • Instance data step rates. This requires the VK_EXT_vertex_attribute_divisor extension.
  • `Private data' APIs for all interfaces.
  • Shader-resource view component mappings.
  • Indirect indexed draws.
  • Indirect draws with a count buffer. This requires the VK_KHR_draw_indirect_count extension.
  • Stream output and stream output queries. This requires the VK_EXT_transform_feedback extension.
  • Predicated/conditional rendering.
  • Primitive restart.
  • Depth rendering without a pixel shader.
  • Depth clipping. This requires the VK_EXT_depth_clip_enable extension.
  • Rasteriser discard.
  • Dual-source blending.
  • Mapping placed resources.
  • The ReadFromSubresource() and WriteToSubresource() ID3D12Resource methods.
  • Simultaneous access to resources from multiple queues.
  • Null-views. I.e., views without an underlying resource.
  • Several more feature support queries.

That's a whole lot of steps in the right direction and there may be DirectX 12 games that do run with vkd3d 1.2 thanks to those and many other improvements since vkd3d 1.1 was released back in October 2018. But it's not enough. There is still a lot of work to be done before you can grab any random Windows game using DirectX 12 expect it to run perfectly on a Linux box with Wine installed.

The source code for vkd3d 1.2 can be acquired from dl.winehq.org/vkd3d/source/. You can also grab it from the git repository at source.winehq.org/git/vkd3d.git/.

5.00
(3 votes)

Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.