The GPU feature set for the next generation of games

0
51
The GPU feature set for the next generation of games

While the 2020 Game Developer Conference has been postponed, luckily that doesn’t mean that everything related to the game for this spring has also been postponed. As the saying goes, the show must go on, and this week we saw Microsoft, Sony and others go ahead and make some big announcements about their game consoles and other projects. Not to be left out of the fray, there are also PC-related news coming out of the show.

The leading PC pack this week is Microsoft (again), with the announcement of DirectX 12 Ultimate. Designed as a new standardized DirectX 12 feature set that packs the latest GPU technology, DirectX 12 Ultimate is intended to serve as a common foundation for both PC game development and Xbox Series X development. This includes not only the grouping of features such as ray tracing and variable speed shading in a single package, but branding of that package so that developers and the general public can more easily deduce if games use these cutting-edge features and if their hardware supports it. And of course, this allows Microsoft to maximize the synergy between PC games and their next console, offering developers a unique feature set on which to base their designs while promoting the fact that the latest Xbox will support latest GPU features.

To be sure, what is announced today is not a new API – even the features discussed today are technically not new – but rather it is a newly defined feature set that encompasses several features that Microsoft and its partners have worked on in recent years. . This includes DirectX Raytracing, variable speed shading, Mesh Shader and sampler feedback. Most of these features have been available in separate form for some time as separate features within DirectX 12, but the creation of DirectX 12 Ultimate marks their official promotion from advance development status or adapter to preparation for masses in general.

For Microsoft, the importance of DirectX 12 Ultimate is twofold. First, DirectX has amassed many new features since the latest feature set, feature level 12_1, defined over half a decade ago. So DirectX was expected to package the features introduced by things like NVIDIA’s GPU Turing architecture and AMD’s upcoming RDNA2 architecture. The end result of this process is the new level of functionality 12_2 or, as it is branded, DirectX 12 Ultimate.

Secondly, this is the first console launch for Microsoft where DirectX 12 was ready and available on startup. While Microsoft has always tried to take advantage of the synergy between PC and console, the fact that DirectX 12 was finalized after the launch of the Xbox One family meant that the past generation has been somewhat misaligned. So similar to the fact that current consoles are the real starting point for DirectX 11 which becomes the basis for video game development, Microsoft aims to do the same for next generation consoles and DirectX 12; and they are trying to do it in a more organized way than ever.

Of course, it doesn’t hurt that this also allows Microsoft to talk about Xbox Series X on the same level as (current) GPUs for PC. The long lifecycle of consoles means that in mid-generation they are outdated by PC GPUs in teams of features and, although the two products do not replace each other perfectly in an economic sense, it becomes one less thing that the game consoles are going for themselves and an added benefit for the PC. Therefore, by giving the new level of functionality a public brand, Microsoft can clearly communicate that it is at the forefront of the GPU technology period; there is no GPU for PC that can surpass them in terms of functionality.

And clarity is an important goal here not only for marketing reasons, but also for customer relationships. The features grouped under the DirectX 12 Ultimate banner are significant, and mesh shaders, in particular, allow developers to completely cancel the traditional rendering pipeline. So when developers start using these features as a real starting point in future games – and, to be sure, it’s likely to be some free time – then the requirements must be clearly communicated to PC players. It will not be enough for a video card to support DirectX 12 only, it will have to support (at least) this new set of functions to satisfy the basic one. But even in the present, where games will continue to run on multiple generations of GPUs for some time to come, the DirectX 12 Ultimate brand is useful for clearly explaining what type of hardware will be needed to access the new features that will be the games coming using .

The features of DirectX 12 Ultimate (aka DX12 feature level 12_2)

Plunging into the new level of functionality itself, as I have already mentioned, the new feature set is designed to encapsulate the new GPU features introduced in recent years. This means associating existing features such as ray tracing and mesh shaders to a new level of functionality, so that they can be more easily addressed by developers.

All in all – and to NVIDIA’s delight – the DirectX 12 Ultimate feature set looks very similar to the graphic feature set of their Turing architecture. Ray tracing, shading mesh and variable speed shading have all been introduced for the first time on Turing, and this represents the current cutting edge for the graphics functionality of the GPU. Consequently, it is not a mistake that this new level of functionality, which Microsoft internally calls 12_2, closely follows the Turing project. Feature levels are a collaboration between Microsoft and all GPU vendors, with feature levels representing a common set of features that everyone can agree to support.

Ultimately, this collaboration and timing means that there is already a current generation hardware that meets the requirements for 12_2 with NVIDIA’s GeForce 16 and 20 (Turing) products. And while AMD and Intel are a little further behind the curve, they also get there. Indeed, in many ways AMD’s upcoming RDNA2 architecture, which has been the focus of console announcements this week, will serve as a counterweight to Turing regarding 12_2. This is a set of features that crosses PCs and consoles and while NVIDIA can dominate PC space, what AMD is doing with RDNA2 is defining an entire generation of consoles for the years to come.

Levels of functionality in DirectX 12

12_2
(DX12 Ult.)
12_1
12_0
GPU architectures
(Presented from)

NVIDIA: Turing
AMD: RDNA2
Intel: Xe?
NVIDIA: Maxwell 2
AMD: Vega
Intel: Gen9
NVIDIA: Maxwell 2
AMD: Hawaii
Intel: Gen9
Ray Tracing
(DXR 1.1)

Yup
No
No
Variable speed shading
(Level 2)

Yup
No
No
Mesh Shaders
Yup
No
No
Sampler feedback
Yup
No
No
Conservative rasterization
Yup
Yup
No
Raster order views
Yup
Yup
No
Tiled resources
(Level 2)

Yup
Yup
Yup
Unlimited resources
(Level 2)

Yup
Yup
Yup
UAV load typed
Yup
Yup
Yup

Overall, there are four great features that Microsoft and partners are focusing on for 12_2, at least publicly. These are ray tracing, variable speed shading, mesh shader and sampler feedback. Some of these features, notably ray tracing, have been available in DirectX 12 for a while, and all have previously been announced by Microsoft as they have worked with developers to perfect them. Nonetheless, ray tracing is also getting some major feature updates to coincide with 12_2, so as a whole the new level of functionality brings many new games to the table for game developers.

As for gamers, the introduction of 12_2 for Windows will take place in the next two months, when Microsoft launches its next major Windows 10 feature update, Windows 10 version 2004 (also known as 20H1). And while games that use the new feature level will be slow to come out (like every new feature level launch), that means players will have to stick to the latest version of Windows to use it. Holding back a version or two (as some of us want to do) doesn’t mean DX12U for you.

Raytracing with DXR 1.1

Kicking off feature family 12_2 is support for raytracing. The DX12 raytracing component was first introduced by Microsoft in 2018 and has been available for developers for some time now. I will not summarize raytracing here in detail – we have already written about it a few times – but at a high level it will play an important role in future games. Essentially simulating the way true light is projected and interacting with the world, raytracing is designed to take control in areas where the current rasterization rendering paradigm has been extended to its limits. The developers have been able to do a lot of amazing things for lighting with incredibly clever hacks on rasterization, but there are some areas where the quality or performance of the light throw (rays) simply can’t be beat. And that’s where hardware raytracing comes in.

Ray tracing diagram (Henrik / CC BY-SA 4.0)

Although it was officially a complete and shipping standard, the original 1.0 standard was still somewhat experimental in nature. By its very nature, it was designed around the hardware (Turing) at the time, and no one was entirely sure what the developers would do with raytracing. Therefore, for the inclusion of raytracing in a full DirectX feature level, the raytracing API itself appears to have some improvements.

The new DXR 1.1 standard extends 1.0 in several ways, to incorporate new features requested by developers over the past two years. And since it only includes new software features, this means that it also works on existing Turing hardware. So in practice DXR 1.1 will supersede DXR 1.0 and no one outside of the developers should be wiser.

The big news in DXR 1.1 mainly focuses on making it easier or more efficient for developers to use raytracing in their games. At the head of this list is the ability to generate raytracing activities on the GPU itself, without requiring the host CPU to do so. This is something the GPU can already do in other situations – particularly if compute kernels generate other compute kernels through dynamic parallelism – and now the same concept is extended to raytracing. Microsoft believes this feature is useful for scenarios where the GPU would like to prepare the raytracing job and they immediately generate it anyway, such as shaders that use raytracing as a means of abatement. Which, to be honest, is also feasible with DXR 1.0; but the fact that the CPU has to invoke it makes it less efficient.

The other important addition here is what Microsoft is calling online raytracing. Perhaps best conceptualized as a scaled-down version of raytracing for simple tasks, online raytracing exposes multi-stage raytracing in the GPU rendering process, allowing developers to take more direct control of raytracing and potentially use it in multiple places. Of particular note here, online raytracing can be invoked in shader stages that cannot invoke normal raytracing, such as calculation shaders, giving developers greater flexibility. Overall, online raytracing involves fewer overhead costs for simple activities, making them more suitable for that scenario, while traditional raytracing (and its better planning mechanisms) will be higher for complex activities.

Variable speed shading

The second function that is grouped into 12_2 is variable speed shading. Another launch feature of the Turing architecture, Microsoft started integrating VRS into DirectX last year.

At a high level, variable speed shading allows you to vary the speed of shading operations within a frame. Instead of running pixels and other shaders at 1: 1 speed with single pixels, the shading frequency can be composed or reduced to focus on better quality or reduce the rendering workload in certain areas. The use of developers will focus primarily on the latter of the two, with developers using it to reduce the amount of shading done in areas of a screen where that level of detail isn’t needed – or at least it’s unlikely to be noticed.

Variable speed shading already has two levels and feature level 12_2 will incorporate the second most powerful level of that function. Level 2 allows you to vary the shading frequency within a draw call, allowing a relatively fine-grained approach to the point where the shading frequency is adjusted. This can be done on a per-primitive basis, or by defining general areas in a frame where the rate should be adjusted (screen space).

Variable rate shading has already been optionally used in some games to date, particularly Wolfenstein II, but its current use is not as widespread as raytracing.

And while the main use for variable speed shading will be on improving performance by selectively reducing the shading resolution – especially for the 4K resolution games that Microsoft wants to do on the Xbox Series X – the feature is also set to play a role in virtual reality headsets. Variable speed shading is the basic rendering technology that makes distorted rendering possible, which in turn promises significant efficiency gains for VR headphones. By rendering the center of the user’s vision at maximum resolution (if not higher, for greater clarity), the amount of work required to render a VR frame is significantly reduced. This can help reduce virtual reality costs by requiring less powerful hardware, or it can be used to free up performance for even better games.

Mesh Shaders: The Next Generation Geometry Pipeline

The third feature of list 12_2 are mesh shaders. And to tell the truth, nothing I write here will do them justice.

At a very high level, mesh shading is the basis for next-generation geometry pipelines. The current paradigm of the geometry pipeline has essentially had new phases fixed on it in several places over the past twenty years, with features such as geometry shaders and tessellation attached to extend the pipeline. But the basic concept of this pipeline is still based on the traditional pre-pixel methods of the rasterization shader and this leads to unnecessary complexity and inefficiency.

Therefore, hardware and software developers want to launch the current geometry pipeline in favor of something new, and that new thing is mesh shaders.

Mesh shaders are perhaps the best designed as calculation shaders for geometry. The significance of the fact that modern computing shaders are incredibly powerful by virtue of not only their parallelism, but their flexibility in terms of how data is processed and routed. Basically, instead of tricking developers into following a rigid pipeline to set up their geometry, mesh shaders allow developers to take almost complete control to do it as they see fit.

Mesh shaders can also be used optionally with amplification shaders. I won’t talk too much about it, but the basic principle is to help configure data for mesh shaders. Microsoft notes that they are particularly useful for felling, although it is not their only use.

Ultimately, the goal of mesh shaders is to significantly improve the efficiency of the geometry pipeline and thus offer developers the safety margin to use increasingly detailed geometries. This is accomplished by removing the layered overhead, as well as making it very practical to do a very geometric culling, stopping the geometry before it hits the vertex shader. Mesh shaders will also allow compression of the index buffer, with an eye to mitigate the memory bandwidth cost of using very complex geometries.

The problem with all of this, as often happens, is the speed with which developers can adopt it. Mesh shaders launch a proven and true geometry pipeline for something completely new, which means developers will have to get used to it. It’s a big change from a game development perspective, and as a result it’s very much a “basic” feature. So mesh shading is something developers can only really do when they rebuild their engines for the next generation of consoles, where pre-12_2 hardware is no longer needed.

Sampler feedback

The final selection feature for Direct X 12 Ultimate / feature level 12_2 is the sampler feedback. This is a brand new feature that has recently been exposed and has so far received very little publicity; although like everything else here, hardware features first appeared in Turing.

Previously demonstrated by NVIDIA as texture space shading, sampler feedback is a broader feature with some different uses. At a very high level, the idea behind sampler feedback is to allow game engines to track how texture samplers are (or will be) used, so samplers provide feedback to the engine, allowing the engine to make smarter decisions about how samplers are used and what resources are kept in VRAM.

The main use case for this, Microsoft predicts, will be in improving the streaming of textures. Using sampler feedback, the game engines can determine which texture tiles will actually be needed and then load only the necessary tiles. This keeps the overall pressure of VRAM low, ultimately allowing developers to use higher quality textures while losing less VRAM for unnecessary panes. Suitable for Xbox Series X, this is especially useful when your games are stored on a high-speed SSD, as it means that the necessary tiles can be pulled from storage space incredibly quickly (almost just-in-time), rather than having to stage them in RAM or take steps to mitigate the long access time of an HDD.

In the meantime, shading the texture space is the other main use of this feature. Another efficiency technique, the shading of the plot space allows the shading of an object without actually rasterizing it. Microsoft’s example here is about lighting – where an object has its lighting calculated once instead of repeatedly as a rasterized object would require. Ultimately, the central idea behind this feature is to be able to cache and reuse the results of the shadow, freeing up GPU resources for other more important activities.