API comparison: DirectX 11 vs DirectX 12, is there a difference in performance?


The comparison of DirectX 11 vs DirectX 12 aims to see the differences in performance, as well as the news of one API versus another. In addition, we will clarify the DirectX 12 Ultimate API and the impact of Ray Tracing in the gaming world.

One of the big changes in DirectX 12 is Ray Tracing, as well as an improvement in performance and latencies, which means a more optimized use of the CPU. To this day, we continue to see many PCs playing video games using the DirectX 11 API, so we wanted to review both to see the impact that the use of each has in relation to the image quality and FPS of the game.

What is DirectX?

First of all, DirectX is an API that allows us to run video games on our PC, which is owned by Microsoft, what is important about that? Well, it is only supported on Windows, while OpenGL or Vulkan can work on Linux or OS X.

But do you really know what an API is? API refers to  Application Programming Interfaces, so we can say that it is a set of functions or commands that serve as a tool for developers when creating a program or video game.

In the case of DirectX, what does a graphical API do? Its function is to mediate between the game's graphics engine and the GPU drivers, which interact with the operating system kernel. For this reason, PS4 games do not work on Xbox or PC: a graphics API is only readable by the API that has been used to design the program or video game.

Later, we will talk about DirectX 12 Ultimate, which is the first graphical API in which this rule is not fulfilled because it is present in Xbox Series and in Windows, although AMD has something to do there (RDNA 2).

DirectX 11 vs DirectX 12: main differences

A priori, we can say that DirectX 12 offers 3 improvements compared to DirectX 11 :

  • Better scaling on CPUs with more cores.
  • Optimization of hardware use.
  • The developers are in control of the hardware usage when they design the game.

Starting with the first advantage that DirectX 12 and Vulkan offer, the CPU is better used: more than 4 cores are used. Previously, it was said that it was useless to have 8 cores because they were not used in gaming, although that is the past. Now, all the graphic load is distributed among all the cores that the CPU has, so now it does matter to have many cores.

Do not take this at face value: more cores ≠ more performance, you just need to see the gaming performance of Ryzen 9 vs Ryzen 7. However, the performance jump of a 4-core CPU vs a 6 or 8-core CPU is patent.

The second improvement is the use of all the hardware in a more optimal way, leaving behind the great difference between NVIDIA and AMD drivers. DirectX 12 is the best hardware used, allowing several Estapar pipelines to run at the same time.

Lastly, the fact that game designers and developers have more control over how the game uses hardware makes a world of difference. Now, developers allocate resources to graphics engines with the help of graphics card drivers, as well as further refine the rendering.

However, there is a problem: each graphic architecture works differently, what does this mean? That it is impossible to optimize the use of hardware equally in AMD and NVIDIA graphics cards because they work differently and are designed differently. In this way, we will always see that the RX 6000 is more powerful than the RTX 3000 in a specific game, and vice versa.

DirectX 12: the 3 keys to improving performance

This battle between DirectX 11 vs DirectX 12 has 3 decisive keys when it comes to giving a winner in terms of performance. These 3 keys are put on the table by the DirectX 12 API.

Mesh Shaders and Task Shaders

To begin with, we must talk about the Pipeline State Objects relating it to DirectX 11 and DirectX 12. In the previous API, we found a fairly wide range of states. The problem was that, sometimes, each state was independent, which created a "tail" effect when progressing: until the previous state is finished, the next one cannot be executed.

In this sense, you will hear the ROPs and TMUs, which are pieces of hardware that serve to finalize those states. It is evident that this process overloads everything, wasting all the hardware we have. Well, DirectX 12 eliminates that interdependence between states by replacing those states with new PSOs (Pipeline State Objects).

The new PSO can change dynamically from one side to another transferring data, do you know the Mesh Shaders Shaders and Task? NVIDIA talked about them when it introduced its range of Turing GPUs. The reason for this lies in the fact that they are shaders that make the whole process more flexible:

  • The Mesh Shaders do the same as a domain or geometry shader using a multithreaded system.
  • The Task Shaders act similarly, although the input and output of this shader are defined by the user.

How do you see it in performance? Mainly when there are many objects to render in a scene. Before, each object required a pull call from the CPU; now with the Task Shader, many objects are sent with a single call. This shader then processes the list and distributes the work to the Mesh Shader, ending with the 3D to 2D conversion through the rasterizer.

This system eliminates the huge amount of requests to the CPU and even increases the detail of the scene.

Technologies to improve the realism of the video game

DirectX 12 came with many novelties under its arm, not only with the hardware optimization but also with the graphic improvement of the video game scenes. There is still a long way to go, but many details have been improved that were not previously focused on.

DirectX Ray Tracing

We must talk about DirectX Ray Tracing (DXR), which is the API support for Ray Tracing that NVIDIA released (along with Microsoft) as the novelty of Turing, nicknamed this technology as RTX. Well, it is a rendering technique based on the tracing of many rays from a light source (the sun, light bulbs, fire, etc.).

Before, this lighting was not dynamic, which affected the shadows and the bounces of each ray on the objects. Thanks to Ray Tracing, the rebounds of each ray on objects are calculated and analyzed, even when they are moving. To do this, millions of very complex calculations are made and the result is translated into brutal realism, bringing us closer to the reality behind a screen.

Variable frequency shading

It is a technology that allows the GPU to focus on certain areas of the screen that are most visible and affected by FPS. In any game shooters, we would say that space would be the target / crosshead / crosshairs.

What is the effect it produces on the screen? It acts like the bokeh effect of reflex cameras (saving distances), which helps us to better focus on the objective or in the area that interests us. However, this setting is discretion for developers, not users: it is the creators who decide where to reduce the shading.

Variable Rate Supersampling

Mainly, we find 2 types of VRS: Motion Adaptive Shading (MAS) and Content Adaptive Shading (CAS). The CAS performs individual shading of each 16 x 16 tile, which helps the GPU increase the shading rate in areas that are highlighted, reducing them from the rest.

On the other hand, there is the MAS, which increases the shading rate of dynamic objects and, at the same time, reduces static objects. Applied in a game, it is a technology that allows priority to be given to the most important details in a scene, while the less important details are not the priority of the GPU.

Looking for examples, we can say that water, sky, or vegetation matters much less than cars in a racing game, right? In this way, the cars will look very detailed, while those details will not.

Multiple graphics card support

Obviously, the SLI or the AMD CrossFire existed before DirectX 11, but the novelty is that we see 2 types of media:

  • Implicit. Leave all work to AMD or NVIDIA.
  • Explicit. The graphics engine of the video game takes control of the management of the 2 GPUs to better combine them.

In the end, the 2 graphics cards use their VRAM for image rendering, but this comparison between DirectX 12 vs DirectX 11 allows us to realize that, in DirectX 12, those images can be stacked to duplicate the VRAM.

DirectX 12 Ultimate: API for Windows and Xbox

In principle, it is an API that updates DirectX 12 to improve it, but the main novelty is that the Xbox Series are compatible with this API. In this sense, it is a hoot for game developers because they can optimize their video games better and work much less.

In the end, this gives tremendous portability, as well as a total unification of the Xbox and PC gaming platform. Given this possibility, both Windows and Xbox benefit because everyone wins (except Sony). Before, we have dropped that AMD has something to do in this union, but in what?

Basically, AMD makes things easier because the hardware of the Xbox Series X and S is not very different from what we see in a PC: a CPU, a GPU, RAM, etc. In the case of consoles, we have an SoC composed of a Ryzen Zen 2 CPU and an RDNA 2 GPU, something that we can run on the desktop with a Ryzen 3000 processor and an RX 6000.

So, we end the tutorial by saying that this DirectX 11 vs DirectX 12 confrontation ends with a clear victory for the second over the first because:

  • Better optimize the hardware.
  • Lets take advantage of CPU cores.
  • Developers have more control over console or PC hardware.

We hope this information has been interesting to you. If you have any questions, comment below and we will answer you shortly. Have you noticed the difference with DirectX 12?

Post a Comment

0 Comments