At least DX12 and Metal have similar semantics to Vulkan. It may be a mess to support multiple platforms without using some kind of translation library, abstraction layer, or off-the-shelf rendering engine, but at least you can work with similar semantics on different platforms.
It's still an unnecessary mess driven by lock-in interests. MS and Apple should have collaborated on supporting Vulkan instead and made whatever higher level stuff on top of it already.
But you are right, translating DX12 to Vulkan is easier than translating DX9 or DX11 to it.
Lock-in was the end result, but the project that eventually resulted in Vulkan hadn't even begun by the time Metal was shipping to developers. Metal was released June 2014, and a project called "OpenGL Next" was started the next month, in July 2014. This project was eventually renamed Vulkan, and wasn't available until February 2016.
You can say that the lock-in is "unnecessary", but these things happen for complicated reasons. Fixing the lock-in isn't just a switch you can flip.
We can dream about a world in which Vulkan came out two years earlier than it did. In the world we live in, Microsoft wanted migration paths for existing DirectX users, and Apple wanted people to take iOS seriously as a platform for developing games. Waiting for OpenGL Next to materialize seemed like a losing game at the time.
When Metal and DirectX 12 were under developement, they weren't competing with Vulkan... they were competing with a set of techniques for OpenGL called AZDO, and it seemed that OpenGL was lagging further and further behind its alternatives with every passing year.
> When Metal and DirectX 12 were under development, they weren't competing with Vulkan.
For huge monsters like MS and Apple the argument of "we already had this, so we can't join the collaborative effort" doesn't really make sense. They very well can join it and scrap their NIH in the process. They even did that in the past, when their NIH didn't manage to cement itself (anyone remembers ActiveX today?).
Plus, in this case the idea of common low level GPU API existed before Vulkan was out, namely in Mantle. AMD proposed to collaborate on it to everyone. Which indeed resulted in Vulkan eventually. So they totally could back that instead of pushing their own stuff (that's besides the fact that MS literally used same Mantle for making DX12). So I don't see them being random bystanders here, but rather someone who deliberately refused to collaborate.
> "we already had this, so we can't join the collaborative effort" doesn't really make sense
But the argument "we already have this, so why spend money on that other thing" makes sense, especially if they profit from it and don't pay the bill for it (the companies of non MS devs which have to handle that mess do).
> For huge monsters like MS and Apple the argument of "we already had this, so we can't join the collaborative effort" doesn't really make sense.
It sounds like there’s a misunderstanding here about what Mantle was. Mantle was not a collaborative effort that different vendors could join in on. Mantle was AMD’s pet project. AMD saying “Hey, why doesn’t everyone use Mantle?” was a non-starter, because as it was, Mantle reflected the architecture of current AMD GPUs. Nvidia or other GPUs would be at a massive disadvantage trying to implement a low-level API that just didn’t fit their architecture right.
However, there was indeed a collaborative effort that Apple and Microsoft were a part of. It was the OpenGL steering committee. In 2013, the steering committee was not busy making Vulkan reality. They were instead trying to fix the problems with OpenGL. The more serious problems—the reasons why Vulkan exists—never actually got fixed.
This was not a massive surprise. The issues were complicated, and most people thought that OpenGL was falling behind DirectX further each year.
> Which indeed resulted in Vulkan eventually.
Yeah, in 2016. By that point, developers had been using Metal for almost TWO YEARS and shipping games with it. Some of those games had shipped sequels or spinoffs.
The project which eventually resulted in Vulkan, called “OpenGL Next,” hadn’t even BEGUN by the time Metal was released to developers. DirectX 12, I assume, was under heavy development at the time.
The story I’ve heard was that the release of Metal was a real kick in the pants for what became the Vulkan effort. If you were to go back in time and rewrite history, and wipe Metal off the face of the planet, who knows what would happen to Vulkan? History is messy.
Not out of the blue. AMD wanted that collaboration and got different parties interested. It took a while to get needed groups together and then develop it until it was out in 2016 (not by AMD alone at that time obviously). Where were Apple and MS when this was happening between 2013 and 2016?
Your argument about non-starter is clearly incorrect, since Vulkan did result from it all. So it was possible, but took time. Khronos was already managing OpenGL so they fit the role of overseeing it. Someone else could do it too may be, but no one else stepped up (including same MS and Apple who easily could if they thought they could do better).
> The story I’ve heard was that the release of Metal was a real kick in the pants for what became the Vulkan effort.
Apple very well knew there is an interest in the common API. Where were they? Making their Apple only NIH of course. Collaboration takes more time, sure. Did Apple join? No. They never cared.
> Your argument about non-starter is clearly incorrect, since Vulkan did result from it all.
I’m talking about what people perceived in 2013. You are welcome to judge people’s decisions, using your knowledge of future events, if that’s what you really want to do.
> Where were Apple and MS when this was happening between 2013 and 2016?
Apple and MS were thinking, correctly, “I bet I can deliver a working API before this committee with representatives from a dozen different companies with competing interests can get off their butts and even figure out what they’re going to name the project.”
Those years were years of massive, massive growth for the App Store and the iOS ecosystem. If you could fix major problems that your customers a couple years faster, during a time when sales were growing 50% year over year, you’d want to do it yourself too. There’s only so many engineers at your company with the patience and drive to sit on committees.
> Khronos was already managing OpenGL so they fit the role of overseeing it.
It was called “OpenGL Next”, not Vulkan, at the time. Well, not when Metal was released, since it didn’t even exist when Metal was released.
> You are welcome to judge people’s decisions, using your knowledge of future events
If some thought it was a non starter, AMD thought it's a good idea that would benefit everyone. Who ended up being right? Not the skeptics, that was my point. The idea was correct and those who backed it helped move it forward. But Apple and MS did the opposite of helping.
> Apple and MS were thinking, correctly, “I bet I can deliver a working API before this committee with representatives from a dozen different companies
That was exactly my point. "Correctly" as in "let's push lock-in to hook developers on this and make life harder for them if they want to support multiple platforms". That's the approach MS and Apple were using for years. But it's not right if you care about making things better for the industry, because it's only slowing progress down. I really see no justification for using development tools like APIs for market control, it's a crooked practice.
I think it's pretty absurd to expect Apple and MS to suspend work on graphics APIs until the committee gets around to figure things out. Especially when the committee is already falling behind, and fixing these issues isn't even on the agenda yet. I just don't understand how someone could blame Apple and Microsoft for developing their own APIs, and then let the OpenGL committee off the hook for completely failing to fix the outstanding issues in the OpenGL API in a timely fashion.
Again... and it seems people keep forgetting this part... Metal was released to developers before the project that eventually became Vulkan even started. At the time Metal was released, Vulkan DID NOT EXIST, not even by a different name.
"I know, let's not work on this important project, and hand it off to an industry working group." Said no engineer, ever.
When a committee fails to produce a working standard, alternatives appear. This is how WHATWG appeared.
> That was exactly my point. "Correctly" as in "let's push lock-in to hook developers on this and make life harder for them if they want to support multiple platforms".
That's just begging the question. If you're going to argue, at least make an argument.
What's absurd is trying to paint them as someone who can't simply start supporting Vulkan today and fix this fragmentation mess. Lock-in has no excuse for the likes of them.
And I already brought examples above where MS did the right thing, like with OpenXR.
They're also locked-in to their own software. It's not just third-party developers using Metal, but first-party developers too. It would be nothing short of a massive effort, to shift the entire company from Metal to Vulkan. Make no mistake, this is what you're asking for. Choosing to support two graphics APIs? No, not gonna happen. This is why Apple deprecated OpenGL in the first place.
Nobody believes that Apple could just snap their fingers and start supporting Vulkan today. It just seems too optimistic to me, and these kinds sweeping changes require a lot of coordination. You introduce the Vulkan API internally (which takes time). Then you start with the various low-level frameworks, like Cocoa. With that base in place, you can write transpilers and migration tools to move from Metal shaders to something that compiles to SPIR-V. Perhaps a new backend to an existing compiler? From there, you work up the stack, applying the migration tools. Core Image is a big one. Undoubtedly, you'd have to back out the changes to some frameworks and try again. At the end, you're working on end-user applications like Final Cut.
You'll also want to build a framework on top of Vulkan to manage resources a bit. Metal has an Objective-C interface and works with ARC, Vulkan is all manual.
OpenXR is a lot smaller than Vulkan, and affects a much smaller number of applications. Not really a suitable comparison.
I would love for everything to use Vulkan, but I also understand the reasons why things didn't turn out that way, and why this is a problem that's not easy to solve.
Yes, and Mantle is a vendor-specific (AMD only) API which only supported one platform (Windows). There were plans to port it to Linux, but there were never any plans to support other GPUs.
That, and Mantle ran on desktop GPUs. Metal was initially targeted at where the gap between API and hardware was the largest, which was mobile GPUs. At least with desktop OpenGL you had the "AZDO" techniques, but on mobile, you had OpenGL ES. Mobile GPUs aren't just smaller versions of desktop GPUs, they use radically different ways of drawing on the screen (although this gap is narrowing, as desktop GPUs are becoming more like mobile GPUs... basically, expect to see tiled rendering on desktops in the future).
If you were living in 2013, would you say, "Gee, I hope someone else forms a committee to adapt Mantle into something which, in the future, maybe in 2016, I could theoretically use?" Or is it faster to make your own API? Or perhaps you like working with cross-platform steering committees that were, at the time, falling behind and failing to address problems with their APIs?
Yes, and that's what they did. They were on the committee, helping out. Seems a lot of people have kind of rewritten the narrative here. Or maybe people forgot that committees & steering groups sometimes fall apart, slow to a crawl, or deliver standards that either aren't useful to developers or aren't feasible for implementers.
You'd be a moron to put all your hopes and dreams in a committee / industry working group delivering something to fix the problems with your platform. Sending more engineers to a committee that's already moving slowly will just slow things down further. So these companies, while sitting on the committee, worked on alternatives and had backup strategies.
Those strategies turned into Metal and DirectX 12, and the committee realized, "Oh, if we don't fix the problems with OpenGL, it will become completely irrelevant." So, in response to this new competition, the OpenGL steering committee started working on OpenGL Next, which later became Vulkan, and about two years later, got released.
Oh, I was really hoping that we were having a discussion about the historical reasons why Metal and DX12 exist. Complaining about how evil Apple and Microsoft are was fun and all in the 1990s when I was a kid hanging out on Slashdot, but I'm just kinda bored of it now.
DX12 yes. Metal, not so much. Yes, it shares some of the features of low-level, explicit APIs, but it's still a much higher level API than Vulkan/DX12 are. Things like image transitions, memory barriers, synchronization semaphores/fences. In Vulkan/DX12 you need to grasp those to get a triangle on the screen, in Metal not as much.