by Tuna-Fish · 10y ago · 0 comments
If you want a simple way to draw graphics without all the complexity, you don't want a graphics API, you want a game engine.
Also, it is still unclear whether D3D12 or Vulkan (or Metal on OSX for that matter) actually provide a real-world advantage in complex games. Most big games that have been released with a D3D12 renderer so far, don't run better than with the D3D11 renderer. Metal mostly shines on iOS, where it is dramatically faster then OpenGLES, but it isn't dramatically better on OSX (at least on the Intel GPU configs I'm testing on).
The main reason for revamped APIs like Vulkan are not performance enhancements but reducing driver complexity and give better diagnostics to developers. Also huge amounts of current generation GPU drivers are heuristics for increasing applications' performance but more importantly to make inherently broken applications (that violate the API contract) still work.
At a recent Khronos event one of the Vulkan engineers of Team Red put it in the following words: "OpenGL and Direct3D-11 and before have the architectural legacy of GPUs as they were 10, 20 years ago. Since then GPUs went that way, while OpenGL and <=D3D-11 went another one. D3D-12 and Vulkan are APIs designed for the modern GPU way, and in 20 years we'll likely see another way of GPUs and APIs".
Emulating these in software is expensive as you are essentially running a multi-process application, where every process gets parameters from the global state. You can either run it sequentially (very slow) or make a copy of the state for each process (generally slow, but there are tricks like fragmenting the state and only copying the changed fragments).
I suspect the reason the DX12/Vulkan games are not showing much improvement in performance is that they share most of the code with the legacy DX11/OpenGL and keep emulating the global state for the new API.
DX12 makes AMD cards work really well (thanks to async stuff) and allows AMD+nVidia multi-GPU.
I wonder if anyone has written a wrapper, which would be at the same level as Metal, but run on top of Metal and Vulkan. That would be something I'd like to use!
I still think Vulkan is great. Now, we need to start building libraries on top of it. The nice thing about very low-level APIs is that it is possible to write higher-level APIs on top of them. The opposite isn't really possible.
[1] https://www.raywenderlich.com/77488/ios-8-metal-tutorial-swi...