Home / Software & Gaming / Console / Microsoft unwraps DirectX 12 for PCs, tablets, smartphones and Xbox

Microsoft unwraps DirectX 12 for PCs, tablets, smartphones and Xbox

Microsoft Corp. on Thursday unveiled DirectX 12, the latest incarnation of one of the world’s most popular application programming interfaces. The new API can not only greatly improve rendering performance, but to also bring top-notch quality graphics to all Microsoft platforms, including personal computers, tablets/smartphones and even Xbox One.

One of the key innovations of DirectX 12 is that it will allow game developers to access hardware resources on a “close-to-metal” level, video games will benefit from reduced GPU overhead via features such as descriptor tables and concise pipeline state objects. In addition, the DirectX 12 will allow games to significantly increase multithread scaling and CPU utilisation. Finally, the new API also presents a set of new rendering pipeline features that will improve the efficiency of algorithms such as order-independent transparency, collision detection, and geometry culling.

microsoft_directx11_3dmark microsoft_directx12_3dmark
During the presentation of DirectX 12 the software giant demonstrated how the 3DMark benchmark recompiled for the new API can improve CPU scaling by up to 50%.

Another key aspect of DirectX 12 is that it now supports various mobile devices. The latter are hungry for additional graphics performance these days, but they also need longer battery life. By improving efficiency of various computations (and essentially their performance), devices can accomplish the job done faster and thus save battery life. Moreover, thanks to better use of multi-core CPUs and highly-parallel GPUs, mobiles can increase their overall performance, which means that portable devices will be able to do the same things as modern notebooks (expect PC and console games to be playable on smartphones and tablets).

Initially, DirectX 12 will be supported by AMD Radeon graphics hardware powered by the GCN architecture; Intel Core i-series processors code-named Haswell and Broadwell with Iris graphics inside; Nvidia GeForce graphics processing units featuring Fermi, Kepler and Maxwell architectures; Qualcomm Snapdragon mobile system-on-chips with advanced Adreno graphics.

DirectX 12 preview will be available this year, but the official release timeframe is unknown. According to Microsoft 50 per cent of PCs will support DirectX 12 at launch. What is unclear is whether there will be certain DX12 functions that the currently available hardware will not be able to support and there will be “native” DirectX 12 graphics processors.

microsoft_directx12_forza5

Microsoft has also demonstrated how Forza Motorsport 5 game, which is only available on Xbox One, can run at 60fps on a PC. Perhaps, that was not a hard thing to accomplish, given that the rig it was run featured Nvidia GeForce GTX Titan Black, one of the highest-performing graphics card today.

There are three key areas that should speed up rendering of 3D graphics in applications that rely on DirectX 12 API: pipeline state representation, work submission, and resource access.

Pipeline state objects. Direct3D 11 allows pipeline state manipulation through a large set of orthogonal object, which provides a convenient, relatively high-level representation of the graphics pipeline, however it does not map very well to modern hardware since modern GPUs re-use their building blocks for different tasks. The Direct3D 11 API allows these to be set separately, but the driver cannot resolve things until it knows the state is finalized, which is not until draw time. This delays hardware state setup, which means extra overhead, and fewer maximum draw calls per frame. Direct3D 12 addresses this issue by unifying much of the pipeline state into immutable pipeline state objects (PSOs), which are finalized on creation. This allows hardware and drivers to immediately convert the PSO into whatever hardware native instructions and state are required to execute GPU work (which PSO is in use can still be changed dynamically and much easier than in case of Direct3D 11). The result is significantly reduced draw call overhead, and many more draw calls per frame.

Command lists and bundles. In Direct3D 11, all work submission is done via the immediate context, which represents a single stream of commands that go to the GPU. Direct3D 12 introduces a new model for work submission based on command lists that contain the entirety of information needed to execute a particular workload on the GPU. Each new command list contains information such as which PSO to use, what texture and buffer resources are needed, and the arguments to all draw calls. Because each command list is self-contained and inherits no state, the driver can pre-compute all necessary GPU commands up-front and in a free-threaded manner. The only serial process necessary is the final submission of command lists to the GPU via the command queue, which is a highly efficient process. In addition to command lists, Direct3D 12 also introduces a second level of work pre-computation, bundles. Unlike command lists which are completely self-contained and typically constructed, submitted once, and discarded, bundles provide a form of state inheritance which permits reuse, which further improves efficiency and lowers the amount of data needed to be sent within a GPU.

Descriptor heaps and tables. Resource binding in Direct3D 11 is highly abstracted and convenient, but leaves many modern hardware capabilities underutilized. Direct3D 12 changes the binding model to match modern hardware and significantly improve performance. Instead of requiring standalone resource views and explicit mapping to slots, Direct3D 12 provides a descriptor heap into which games create their various resource views. This provides a mechanism for the GPU to directly write the hardware-native resource description (descriptor) to memory up-front. To declare which resources are to be used by the pipeline for a particular draw call, games specify one or more descriptor tables which represent sub-ranges of the full descriptor heap. As the descriptor heap has already been populated with the appropriate hardware-specific descriptor data, changing descriptor tables is an extremely low-cost operation. In addition to the improved performance offered by descriptor heaps and tables, Direct3D 12 also allows resources to be dynamically indexed in shaders, providing unprecedented flexibility and unlocking new rendering techniques. With dynamically indexable resources, a scene with a thousand materials can be finalized just as quickly as one with only ten.

KitGuru Says: What Microsoft says looks extremely good on paper. The industry needs to boost efficiency of processing, additional performance and close-to-metal approach for those developers who want to make breakthrough content. The thing is that DirectX 12 will still have to support hardware from at least four designers, which means that at least some operations may be done to fit all, meaning lower efficiency compared to proprietary technologies like Mantle. In case Microsoft manages to make DX12 nearly as efficient as Mantle, the latter will not be needed and will vanish into oblivion; but if AMD manages to further enhance efficiency of Mantle, it will have a chance to get popular on the PC, which will catalyse Nvidia to respond with its own proprietary API.

Become a Patron!

Check Also

Horizon multiplayer spin-off coming 2025, job listing suggests

The long-awaited Horizon Zero Dawn multiplayer spin-off could finally launch in 2025. Job listings suggest the studio is in the final stages of development.