Dev Preview of New DirectX 12 Features

Jianye

October 28th, 2019

In this blog post, we will preview a suite of new DirectX 12 features, including DirectX Raytracing tier 1.1, Mesh Shader, and Sampler Feedback. We will briefly explain what each feature is and how it will improve the gaming experience. In subsequent weeks, we will publish more technical details on each feature along with feature specs. All these features are currently available in Windows 10 Insider Preview Builds (20H1) through the Windows Insider Program.

DirectX Raytracing Tier 1.1

Back in October 2018, we released Windows 10 OS and SDK to support DirectX Raytracing (aka. DXR tier 1.0). Within one year of its official release, game developers used DXR to bring cinematic level of photorealism in real time to a long list of games.

At the same time, we continue to work with both GPU vendors and game developers to better expose hardware capabilities and to better address adoption pain points. As a result, we will introduce DXR tier 1.1 with the following new additions on top of tier 1.0.

Support for adding extra shaders to an existing Raytracing PSO, which greatly increases efficiency of dynamic PSO additions.

Support ExecuteIndirect for Raytracing, which enables adaptive algorithms where the number of rays is decided on the GPU execution timeline.

Introduce Inline Raytracing, which provides more direct control of the ray traversal algorithm and shader scheduling, a less complex alternative when the full shader-based raytracing system is overkill, and more flexibility since RayQuery can be called from every shader stage. It also opens new DXR use cases, especially in compute: culling, physics, occlusion queries, and so on.

DXR tier 1.1 is a superset of tier 1.0. Game developers should start building their raytracing solution based on the existing tier 1.0 APIs, then move up to tier 1.1 once they can better evaluate the benefit of tier 1.1. to their games.

See more details at DirectX Raytracing (DXR) Tier 1.1.

DirectX Mesh Shader

Mesh shaders and amplification shaders are the next generation of GPU geometry processing capability, replacing the current input assembler, vertex shader, hull shader, tessellator, domain shader, and geometry shader stages.

The main goal of the mesh shader is to increase the flexibility and performance of the geometry pipeline. Mesh shaders use cooperative groups of threads (similar to a compute shader) to process small batches of vertices and primitives before the rasterizer, with choice of input data layout, compression, geometry amplification, and culling being entirely determined by shader code. Mesh shaders can enhance performance by allowing geometry to be pre-culled without having to output new index buffers to memory, whereas triangles are currently only culled by fixed function hardware after the vertex shader has completed execution. There is also a new amplification shader stage, which enables tessellation, instancing, and additional culling scenarios.

The flexibility and high performance of the mesh shader programming model will allow game developers to increase geometric detail, rendering more complex scenes without sacrificing framerate.

See more details at Coming to DirectX 12— Mesh Shaders and Amplification Shaders: Reinventing the Geometry Pipeline.

DirectX Sampler Feedback

Sampler Feedback is a hardware feature for recording which areas of a texture were accessed during sampling operations. With Sampler Feedback, games can generate a Feedback Map during rendering which records what parts of which MIP levels need to be resident. This feature greatly helps in two scenarios as detailed below.

Texture Streaming

Many next-gen games have the same problem: when rendering bigger and bigger worlds with higher and higher quality textures, games suffer from longer loading time, higher memory pressure, or both. Game developers have to trim down their asset quality, or load in textures at runtime more than necessary. When targeting 4k resolution, the entire MIP 0 of a high quality texture takes a lot of space! It is highly desirable to be able to load only the necessary portions of the most detailed MIP levels.

One solution to this problem is texture streaming as outlined below, where Sampler Feedback greatly improves the accuracy with which the right data can be loaded at the right times.

Render scene and record desired texture tiles using Sampler Feedback.

If texture tiles at desired MIP levels are not yet resident: Render current frame using lower MIP level. Submit disk IO request to load desired texture tiles.

(Asynchronously) Map desired texture tiles to reserved resources when loaded.

Texture-Space Shading

Another interesting scenario is Texture Space Shading, where games dynamically compute and store intermediate shader values in a texture, reducing both spatial and temporal rendering redundancy. The workflow looks like the following, where again, Sampler Feedback greatly improves efficiency by avoiding redundant work computing parts of a texture that were not actually needed.

Draw geometry with simple shaders that record Sampler Feedback to determine which parts of a texture are needed.

Submit compute work to populate the necessary textures.

Draw geometry again, this time with real shaders that apply the generated texture data.

See more details at Coming to DirectX 12— Sampler Feedback: some useful once-hidden data, unlocked.

Other Features

PIX Support

PIX support for these new DirectX 12 features is coming in the next few months. We will provide more details when deep diving into each feature in coming weeks.

Call to Action

Please stay tuned for subsequent blog posts in the next few weeks, where we will publish more technical details about each feature previewed in this blog post, as well as feature spec for reference.

To use these features in your game, you need to first install the latest Windows 10 Insider Preview Build and SDK Preview Build for Windows 10 (20H1) from the Windows Insider Program. You also need to download and use the latest DirectX Shader Compiler. Finally, you need to reach out to GPU vendors for supported hardware and drivers.

All these new features come from extensive discussions and collaborations with both game developers and GPU vendors. We are looking forward to working with game developers to use these features to bring their games to the next level of rendering quality and performance! Please let us know if you have further questions, or if you are interested in collaborating with us on showcasing these features in your games.

[Edited on Nov 13, 2019] Added links to blog posts that cover each feature in more details.