Skip to content

Initial D3D12 support in WSL

Jesse Natalie requested to merge jenatali/mesa:d3d12-wsl into master

This MR has a few things, which I'm happy to split and land separately if people would like:

  • Adds a wrap for the D3D headers, which are newly published on GitHub under MIT license: This is useful both on Windows (we don't rely on having up-to-date headers in the Windows SDK) and for WSL.
  • Adds build support for the D3D code in Linux. For the most part this is just mucking with some includes, but a few things need to be substantially different, such as fence synchronization.
  • Adds d3d12 as a software driver option for GALLIUM_DRIVER similar to zink.

This is the first steps towards #3835 (closed).

Eventually, we'd like to build a system for automatically selecting the d3d12 driver if /dev/dxg is present, but that likely requires some X/Wayland work to be able to marshal the contents. Simply using the software driver path should be good enough for now. This MR originally went pretty far down that rabbit hole, but I've cut it back for now to give us something simpler and more functional to merge sooner.

/cc @kusma

Edited by Jesse Natalie

Merge request reports