Microsoft released the source code of the D3D9On12 layer that is used to translate Direct3D 9 commands to Direct3D 12

Good news has been released from Microsoft and it is that recently made it known via a blog post opening the source code of the D3D9On12 layer with the implementation of the DDI (Device Driver Interface) device, which translates Direct3D 9 (D3D9) commands into Direct3D 12 (D3D12) commands.

This move by Microsoft will now make it easier than ever for developers to transition from DirectX11 to DirectX12 for their games. The DX12 translation layer is essentially a helper library for translating graphical concepts and commands from a DX11-style domain to a DX12-style domain.

It's been a while since we last mentioned the D3D9On12 mapping layer. As a quick update, it maps D3D9 commands to D3D12 acting as the D3D9 Device Driver Interface (DDI). Having this mapping layer allows older D3D9 applications to run on modern systems that may not have a D3D9 driver. Since the last blog post, we added support for the Alpha to Coverage extensions, fixed some bugs, and cleaned up the code base for open source.

This is undoubtedly good news and is that various projects that work with the layer can now benefit, since as such it allows legacy applications to work in environments that only support D3D12, that is eg this can be useful to implement D3D9 based on the projects vkd3d and VKD3D-Protonas these offer a Direct3D 12 implementation for Linux that works by translating D3D12 calls to the Vulkan graphics API.

D3D9On12 is a layer that maps graphical commands from D3D9 to D3D12. D3D9On12 is not an implementation of the D3D9 API, but rather an implementation of the D3D9 DDI (Device Driver Interface) user mode. That means it is not a binary called d3d9.dll, but rather it is called d3d9on12.dll.

When an application creates a D3D9 device, it can be chosen to be a D3D9On12 device, rather than a native D3D9 device. When this happens, d3d9on12.dll is loaded by the D3D9 runtime and initialized. When the application calls the render commands, D3D9 will validate those commands and then convert those commands to DDI D3D9 and send it to D3D9On12, just like any D3D9 driver.

D3D9On12 will take these commands and convert them into D3D12 API calls, which are further validated by the D3D12 runtime, optionally including the D3D12 debug layer, which are then converted to DDI D3D12 and sent to the D3D12 driver.

It is also mentioned that the project is based on the code of a similar subsystem included in Windows 10. It should be noted that the publication of the code D3D9On12 will provide an opportunity so that the community representatives participate in bug fixes and adding optimizations, and it can also serve as an example to study the implementation of the D3D9 DDI drivers and a framework for creating such layers for translations of various graphics APIs in D3D12.

Why open source?
D3D9On12 has been a part of Windows 10 for a few years now, and during that time it has grown in stability and usability. Make it open source:

Allow the community to contribute additional bug fixes or performance improvements.
serve as another example of how to use the D3D12TranslationLayer
give those who are interested a look at what a D3D9 DDI implementation looks like

At the same time, a DXBC Signer package has been released that enables the ability to sign DXBC files arbitrary generated by third-party toolkits. D3D9On12 uses this package to sign DXBCs generated by converting shaders to a new model.

Finally if you are interested in knowing more about it, you can check the details of the publication that Microsoft made on its blog In the following link.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.