Search Unity

Staying ahead with DirectX 12

January 22, 2015 in Technology | 3 min. read
3DMark DirectX 12 gains
3DMark DirectX 12 gains
Topics covered
Share

Last year at GDC Microsoft announced DirectX 12. During yesterday's Windows 10 media briefing, Phil Spencer of Microsoft mentioned that Unity is going to add support for DirectX 12. Here are some more details we can share with you today!

Direct3D 12 is a new graphics API with the promise of reducing driver overhead and allowing better use of multi-core systems. In those aspects it is comparable to AMD's Mantle and Apple's Metal.

The architecture of Direct3D 12 differs greatly from that of Direct3D 11 both in the way memory is accessed and GPU commands are issued. Rather than having a single context on which to set states and issue draw calls, we can now build command lists on multiple threads and retain them over multiple frames if necessary, saving precious CPU cycles and eliminating the dreaded my-render-thread-does-most-of-the-work problem. This has the potential to both reduce total frame time and increase battery life.

3DMark have ported one of their benchmarks to DirectX 12 and reported a 50% improvement in CPU utilization. See this blog post for more details.

3DMark DirectX 12 gains Tested on GIGABYTE BRIX Pro (Intel Core i7-4770R + Iris Pro Graphics 5200)
Tested on GIGABYTE BRIX Pro (Intel Core i7-4770R + Iris Pro Graphics 5200)

Intel have also demonstrated what can be done on a Surface Pro 3 with Intel HD4400 graphics. This blog post has all the details.

Intel DirectX 12 gains Close up of another CPU/GPU power graph taken during a locked framerate Intel Asteroids demo showing over 50% CPU power usage reduction
Close up of another CPU/GPU power graph taken during a locked framerate Intel Asteroids demo showing over 50% CPU power usage reduction

Direct3D 12 is expected to run on all Microsoft devices: mobiles, laptops, desktops and Xbox One, all of which Unity already supports. It is only logical for us to adopt the new universal API. However a significant amount of work is required to reap all the benefits this architectural switch can provide and that is why we have started early. Over the past several months we have worked closely with Microsoft to bring Unity to DirectX 12 and our initial port is now passing over 95% of our graphics tests.

Passing all the tests is only the first step. Once we are happy with the implementation feature-wise we shall move on to the new features of Direct3D 12 and invest heavily in optimization. There is ongoing work to allow our renderer to better use multiple cores which will apply directly to Direct3D 12 and hopefully provide the promised performance improvement. Right now, it's too early to discuss performance due to the alpha state of Windows 10 and DirectX 12 drivers, however we are happy with the numbers we're seeing.

Both Nvidia and Intel have given us ample support, and we now have code running on both Nvidia and Intel hardware. All of our demos are behaving well on Direct3D 12. That makes us very confident that your games will too.

Currently our plan is to release DirectX 12 support early in the Unity 5 cycle (well in time for the release of Windows 10), and to target standalone builds and Windows Store Apps first. Then we'll follow up with Windows Phone and Xbox One support, aligning with the plans Microsoft has for their platforms.

Keep checking our blog for more DirectX 12 news. We should have more announcements in the next few months. In the meantime you can find more general information on the subject on the Microsoft DirectX 12 blog.

January 22, 2015 in Technology | 3 min. read
Topics covered