John Hable on how DX12 will impact consoles and PC.
Microsoft’s upcoming API DirectX12 has been under some serious discussion for quite a long time. It’s quoted to be a game changer for PC games development but what about consoles? Since the consoles already have a low level API, will the new APIs such as DX12 and Vulkan make that much of impact compared to what we have seen on PC gaming?
John Hable, Filmic World’s boss and former Naughty Dog developer believes that console games will benefit less from the new APIs. This is because console games are mostly GPU bound compared to PC games which are CPU bound.
“The short answer is that newer APIs will make the CPU faster, but will probably not have much effect on the GPU,” Hable said to GamingBolt. “The improved APIs change how long it takes for you to tell the GPU what you want it to do, but they have no effect on how long it takes the GPU to actually execute those instructions. ”
“If your game is bottlenecked by the CPU, going to DirectX 12 or Vulkan will greatly help your game. But if you are bottlenecked by the GPU then the updated APIs will help little or not at all. Since many PC games are bottlenecked by the CPU, you will see massive gains there. However console games are usually bottlenecked by the GPU so I would not expect significant changes from newer APIs. The GPU is the same regardless of if you are using OpenGL, DirectX11/12, or Vulkan.”
Hable simplifies the difference between DirectX 11 and DirectX 12 with a straight forward example.
“Let’s say that you are drawing a cute little family of bunnies. These bunnies are made of triangles and each bunny has its own color map, normal map, etc. With OpenGL or DirectX 11 you would have to describe each of these bunnies one at a time. The first bunny has a red color map. The second bunny has a blue color map. The third bunny has a green color map. And every frame you have to tell the GPU the same thing over and over again.”
“DirectX12 and Vulkan are much more efficient. In the first frame, you can describe all the bunnies to the GPU. You tell the GPU that there is a red one, a blue one, and a green one. Then they can all be drawn together. With DirectX 11 and OpenGL you have to describe all the bunnies every frame but with DirectX 12 and Vulkan you can just say “draw all the bunnies”. I’m oversimplifying but that is the idea.”
“The key idea is that the communication between the application and the GPU is much more efficient. You can convey the same information with less overhead. But the amount of time that it takes to actually render those bunnies is the same. The GPU does not care if the commands came from DirectX 11/12, OpenGL or Vulkan. It takes the same amount of time to actually draw those triangles. But the communication (which takes CPU time) is much faster.”
“So if your game is bottlenecked by the overhead of telling the GPU what you want to do, then the APIs are a huge help. This situation happens a lot on PC games where you have a powerful card sitting idle because it can draw things faster than it can be told to draw them. But console games tend to keep the GPU working hard so there are less gains to be made.”
“Although the GPU might make some gains along the way. Ideally you would render objects from front to back to minimize the amount of overdraw in a scene. Unfortunately that would have too many state changes and it would take DirectX 11 and OpenGL too long to translate those commands to the GPU. Many games are intentionally making “bad” decisions for the GPU to help out the driver on the CPU.”
“For example, let’s say that your bunnies have multiplied and now you have 5 red bunnies, 5 blue bunnies, and 5 green bunnies. For the GPU, the ideal way to render the bunnies is front to back to minimize overdraw. But the cost of telling the driver to do that would be too slow with DirectX 11 and OpenGL.”
“Telling the GPU to render red, blue, blue, green, red, blue, etc. would have too many state changes. So you have to render all the red bunnies together, followed by all the blue and green bunnies. With DirectX 12 and Vulkan, the overhead is low enough that we can render the bunnies in the optimal front to back order. Of course I’m oversimplifying and there are other considerations but the point is the same.”
Stay tuned for more coverage from our exclusive interview with John Hable in the coming days.