Hello,
As everyone might know, the DX12 backend has been slow, and somewhat unstable, for as long as there has been one. Back in 2020 the per drawcall overhead on the CPU was a bit over double what it was on other backends. With recent improvements the DX12 backend is now as fast as (or in some cases faster than) DX11 when it comes to CPU usage for the vast majority of use cases. In scenarios with a large amount of drawcalls, DX12 beats DX11 handily in standalone with regards to CPU performance. Results based on our testing show that there isnât a substantial difference between DX12 and our other Editor backends to warrant an Experimental tag anymore. Therefore:
We are happy to announce that as of 2022.2.0a17, the DX12 graphics backend is officially out of experimental state.
What does this mean in practice? You can now make a player that has only the DX12 backend. Experimental tag forced you to add at least one non experimental backend but now DX12 can be the sole backend in a player build. This is the only functional change you see with the removal of the experimental tag.
Another feature which has been unique to DX11 is the memory residency management. Windows allows you to essentially use more GPU memory than what you have. In DX11 this is fully automatic but DX12 requires us to give it a slight helping hand so to speak. This has now been implemented so you can overprovision GPU memory. Itâs not quite as good as in DX11 as we do this essentially on a per frame basis. But otherwise huge scenes should be far more stable now.
However DX12 is not always the fastest. The DX11 driver can do things like reorder compute shader dispatch calls, which it does aggressively. With DX12 the driver cannot do this, the same applies to Metal and Vulkan. And even when possible, such as in many OpenGL drivers, the driver doesnât always do it. So if you have a complex set of compute shaders it is likely that in DX11 it will be faster. There are plans to do this sort of reordering in Unity but that will take time. At the moment, heavily GPU bound scenes with a complex workload are likely to run faster on DX11.
A major painpoint in Unity is the Editor performance. In order to alleviate this DX12 allows you to run native graphics jobs in Editor. This feature is still experimental but you can already try it by launching the Editor with the following command line argument:
-force-gfx-jobs native
User feedback has been that in massive projects running the Editor with native jobs is essentially mandatory, but weâre not quite there yet to confidently enable them by default for everyone. Therefore weâd love feedback and bug reports for any issues that pop up when using them.
tl;dr: 2022.2.0a17+ You are GPU bound = Use DX11. You are CPU bound = Use DX12. If you are brave and need Editor perf run DX12 with native graphics jobs in Editor.