Vulkan and DX12 similarities

Started by
6 comments, last by pcmaster 5 years, 3 months ago

Is there an explanation for why Vulkan and DirecX12 api design are similar? Like did any ACM SIGGRAPH graph write a paper on efficient graphics api and Khronos and Windows took it 

and implemented for their platform? 

Advertisement

DirectX12 was, to a decent extent, a response to AMD's Mantle. Microsoft were planning on sticking to a DirectX11 type approach, but AMD forced them into going further when they introduced Mantle with it's higher performance approach. Vulkan is partially derived from Mantle (although more general in terms of target architecture). So that's one answer: they have common inspirations.

There's another answer, and one that applies more generally: usually there is only one general approach that is best for the current hardware model. OpenGL and DirectX (and others) have always had considerable similarities in how they work, and the differences have been more about implementation philosophy than architectural design. Whenever this hasn't been true, one or other API has been clearly better.

In the case of DirectX12/Vulkan, the similarity is because GPUs have increased in power more rapidly than CPUs, and thus the best APIs are those that are best as shuffling processing from CPU to GPU. By pushing the management of resources to the programmer and away from the library they reduce duplication and allow more efficient use of resources.

They are similar mostly because they were designed to achieve the same goals : low CPU overhead, parallel command recording and submission and more fine grained control on resources and pretty much everything.

They are more similar then the previous generation APIs because they are both a thin abstraction of the device. They do hide the driver API specifics but they do not hide the concepts i.e. the way the device actually works. Since they expose the same GPUs and the same concepts, they just do the same thing. Previous generation APIs were trying to obfuscate the GPUs and driver notions.

There are some small differences mostly because Vulkan had to cope with a wider range of devices (mobile devices using tiler GPUs). The most notable of these differences is the notion of a render-pass  being decomposed into sub-passes with Vulkan.

There was no common document, to my knowledge at least, that both Khronos and Microsoft followed, just the same goals on roughly the same hardware as well as the same demands from the game developers. It is true however that AMD gave the Mantle specification to the Khronos group to speed up the process of Vulkan development (as a spec).

We think in generalities, but we live in details.
- Alfred North Whitehead
7 hours ago, Irusan, son of Arusan said:

Vulkan is partially derived from Mantle (although more general in terms of target architecture)

FWIW, Mantle was designed to be cross-vendor, with it having a fairly generic core, and a load of AMD specific extensions.

On consoles, MS has traditionally just modified their current version of D3D to remove unnecessary bloat and expose a few more hardware-specific details. Initially on Xbone they did this with D3D11. However, these "edited" APIs are typically pretty monstrous. D3D12 was designed for PC (and Windows phone) too, but one big motivator was making a slim, efficient API for the Xbone, which would've involved working very closely with AMD.

Same goes with Sony - the PS4 uses the same AMD architecture, so AMD would've helped design Sony's GNM API. After that, they've gone and created Mantle to show that it can be done on PC, which turned into Vulkan.

You've got one group with their fingerprints on the initial stages of all of the above :)

Thank you guys for replies. I guess it is a good time for new developers to learn any of the graphics API, be it Vulkan or DX. One can easily switch between them if wanted to. MS has shown that they are mostly late to party(C#, DX12, azure), but they do good job at implementing stuffs. Their agenda might as well be "wait and see" and then attack ?

4 hours ago, ritzmax72 said:

I guess it is a good time for new developers to learn any of the graphics API, be it Vulkan or DX. One can easily switch between them if wanted to. MS has shown that they are mostly late to party(C#, DX12, azure), but they do good job at implementing stuffs. Their agenda might as well be "wait and see" and then attack ?

Well D3D12 was released about a year before Vulkan was :D Khronos is typically playing catch up. 

The previous generations are quite similar too - there's equivalences between most features in D3D11 and GL4, or D3D10 and GL3, or D3D9 and GL2 (and now D3D12 and VK). I'd say it's far easier to learn a new generation of APIs if you're already familiar with a previous one, as most of the same concepts carry over, just rearranged! I've used at least 10 different GPU APIs in my career, and each new one just gets easier / quicker to learn ?

One interesting evolution with D3D12 and VK is that with them it's almost impossible for an unfamiliar/non-render programmer to "throw something together" (in their pure APIs, without some encapsulation/simplification frameworks on top of them). It's just too painful with so many things the drivers were doing for us in the past which just aren't there anymore -- watch out, I'm not saying it's wrong, on the contrary, and I surely don't want to start a flame! :)

This topic is closed to new replies.

Advertisement