DirectX 12

If you just want the good news and links: Microsoft have released a new Agility SDK (1.606.n) that contains support for Shader Model 6.7 (SM6.7). In addition, a new preview Agility SDK (1.706.n) is also available that includes a new Enhanced Barriers preview. In order to support that, we have an upcoming AMD Radeon Software Adrenalin Edition release with full SM6.7 support on all currently supported AMD Radeon GPUs, and a KB driver to use with the preview Agility SDK to try out Enhanced Barriers.

If you want to know more, keep reading, and we’ll update this post with the link to the AMD Radeon Software Adrenalin Edition driver release as soon as it is available. The KB driver supports the Enhanced Barriers preview on all currently supported AMD GPUs.

Shader Model 6.7 advanced texture operations

Back in February this year, Microsoft announced that Shader Model 6.7 was in the works, aiming the guts of work put into that new shader model at more flexible and free use of the texture hardware in modern GPUs, along with another useful increase to the wave-level programming model.

The texture hardware programming changes are focused on making texture gather — a feature where you ask the hardware to give you the four samples needed for a filtering operation to take place — more ergonomic, mainly by relaxing some usability restrictions and allowing access to the raw samples without them being processed on the way back to the shader. There are also some associated changes to resource management that are also part of this raw gather feature to allow it to work, mostly to tell D3D12 that your texture resource can be cast to the type you need, before you call GatherRaw() in your shader.

Shader Model 6.7 also allows you to provide variable sample location offsets to the Load() function and Sample() function family in your shader, removing the compile time restriction that was in place previously, making using sample location offsets lot more useful in practice. In that same area, SampleCmpLevel() has also been added to allow you to explicitly specific the MIP level you want to sample and compare to, filling an obvious gap in overall sampling functionality where you could only explicitly choose the zero level before.

Lastly in the texture programming changes is the ability to directly write multisampled textures. Prior to Shader Model 6.7 you could only write to a multisampled texture by binding it as a render target, whereas now there’s a RWTexture2DMS UAV-type object for directly writing the samples in your shader.

SM6.7 wave programming changes

The wave-level programming changes are exciting, opening up some new doors to more efficient quad-level programming in your shader. QuadAny() and QuadAll() will now tell you truthiness for the quad lanes executing the shader, potentially helping you help the compiler emit more efficient code in non-quad-uniform situations.

You can now also annotate shaders with [WaveOpsIncludeHelperLanes], which makes helper lanes stick around during wave operations, allowing those wave operations to contribute to derivate ops that rely on helper lanes being active. Previously that behaviour was undefined, since the helper lanes could be demoted prior to the wave operations happening.

Enhanced Barriers preview

DirectX 12 is also revamping how barrier sychronization is programmed, and how efficient they can then be on the underlying hardware, with a fairly significant change to the programming model. Microsoft call that Enhanced Barriers, and it was first announced by the D3D12 team back in December 2021.

It’s still in preview, but the new release incorporates some significant developer quality of life changes that might make you enthusiastic to give it a whirl. The big difference is that GPU-based validation (GBV) now supports Enhanced Barrier validation, which makes it significantly faster to use! It’s much lower overhead compared with the shader instrumentation needed to support GBV of the legacy resource barrier system.

Summary

There’s more to the Shader Model 6.7 support and the Agility SDK preview with enhanced barriers than we describe above, so please visit the Microsoft blog for more information including API specifics and links to the two new Agility SDK releases and remember to pick up our KB driver if you want to try out the Enhanced Barriers preview on AMD GPUs.

Related content

DirectX 12

Developing DirectX® applications

Developing with DirectX? This page shares our DirectX blog posts, presentations, samples, and more. Let us help you create and optimize your DirectX applications!

DirectX 12

DirectX®12

Microsoft® DirectX®12 provides APIs for creating games and other graphics applications. Find out how we can help you get the best out of DirectX®12.