Greetings from the Graphics Platforms team!
As some of you may know, we recently promoted the DirectX12 backend out of experimental state in 2022.2.0a17 , after introducing a significant mass of performance and stability improvements.
Some of the noticeable changes for Unity 2022 include the introduction of a new memory manager, to allow the over commission of resources beyond available GPU memory, as well as optimizations to the rendering setup for additional CPU performance.
Draw call Performance Test (x4000 draw calls, DX12 /w Graphics Jobs vs DX11)
Moving forward to Unity 2023.1, our team has been hard at work on additional optimizations and improvements, with the aim of matching or exceeding DX11 performance in the majority of use cases.
DirectX12 introduces exciting new capabilities and features, such as “Graphics Jobs” support for improved CPU utilization. When utilizing Native Graphics Jobs, the main thread processes and queues intermediate drawing commands, which the rendering thread converts into graphics API calls by launching worker threads that record and submit GPU command buffers to the queue.
Unity 2023.1a21 introduces a new Graphics Jobs Threading Mode called “Split Graphics Jobs”, which aims to reduce unnecessary begin/end of frame synchronization between the main and native graphics jobs threads, resulting in significant performance improvements. In our internal testing, we are observing meaningful CPU performance gains over DX11 when targeting DX12 using Split Graphics Jobs.
HDRP Sample Scene (DX12 /w Split Graphics Jobs vs DX12 & DX11)
Performance gains can become increasingly more pronounced in draw call heavy scenarios, such as our internal draw call performance test:
Draw call Performance Test (x4000 draw calls, DX12 /w Split Graphics Jobs vs DX11)
We are also planning to introduce Editor support for Graphics Jobs, in order to improve the project authoring experience via better scene-view and playmode rendering performance when targeting DirectX12. We are currently aiming to introduce DX12 Graphics Jobs support in the Editor in Unity 2023.2, with support for other platforms (Metal, Vulkan) later down the line.
While DX12 already exceeds DX11 in terms of CPU performance, DX11 may still come on top in GPU-heavy scenarios, due to significant driver optimizations for reducing GPU synchronization. With additional optimizations coming down the line, as well as the adoption of new DX12 API features, we aim to surpass DX11 performance in an ever-increasing number of scenarios.
With the DirectX12 backend now out of experimental, we will continue to closely monitor DX12 utilization and incoming user reports to address your valuable feedback, and eventually promote the DX12 backend as the default graphics API for Windows platforms.