D3D12 Translation Layer and D3D11On12 are now open source

January 14th, 2020

If you’re a developer looking to port your game to DX12, we have good news: There’s a helper library available to get you there more easily!

We’re excited to announce that the D3D12 Translation Layer is now open source. The D3D12 Translation Layer is a helper library for translating graphics concepts and commands from a D3D11-style domain to a D3D12-style domain. As an example of how to use the library, we have also open sourced D3D11On12, a mapping layer that maps graphics commands from D3D11 to D3D12.

Check out the source on GitHub:

Read on to learn more about what this means for you.

A bit of history: Why mapping layers?

The first mapping layer project was started during the development of Windows 10 and D3D12. The Windows graphics team has a large set of D3D11 content which was heavily utilized during design and bring-up of the D3D12 runtime and driver models. In order to use that content, a mapping layer named D3D11On12 was developed.

This mapping layer proved successful and useful, to the point that a second mapping layer was developed, named D3D9On12. As the name implies, this maps from D3D9 to D3D12, and it has to solve a lot of the same problems as D3D11On12. D3D11On12 was thus refactored into two pieces: a part that implements the D3D11-specific concepts, and a more general part that translates more traditional graphics constructs into a modern low-level D3D12 API consumer. This more general part is what became the D3D12 Translation Layer. The translation layer code is currently being used by two mapping layers that ship as part of Windows: D3D11On12 and D3D9On12.

We realize that the D3D12 Translation Layer solves problems that are not unique 11On12 and 9On12, and we’re sharing the source with the graphics development community so others can reuse and benefit from our work. Both the D3D12 Translation Layer and D3D11On12 are available on GitHub today. If you have questions as you play with the code, feel free to reach out to us on Discord.

What can you do with the code?

Make the move to D3D12 more quickly. Leverage the D3D12 Translation Layer library as-is in your game to port your existing work to D3D12 faster.

Leverage the D3D12 Translation Layer library as-is in your game to port your existing work to D3D12 faster. Build a mapping layer from your favorite graphics or compute API to D3D12. Take advantage of a tested and conformant IHV DirectX 12 driver via your own D3D12 wrapper.

Take advantage of a tested and conformant IHV DirectX 12 driver via your own D3D12 wrapper. Contribute back to Windows. We welcome community contributions to both the D3D12 Translation Layer and D3D11On12. Improvements will be pulled back into the Windows codebase and eventually ship in future versions of Windows 10.

Learn more