5 ms·
> C. Metal is a high-level language, Vulkan is low-level. Apple wants you to use a high-level language so they have more flexibility in optimizing the low-level
by jms55 5y ago
> C. Metal is a high-level language, Vulkan is low-level. Apple wants you to use a high-level language so they have more flexibility in optimizing the low-level for you now and in the future, which Vulkan closes off more.
The problem is that historically, this is what's lead to tons of issues in games. Drivers make their own "optimizations" resulting in terrible performance for some task on one GPU, and great performance on another. Or instead of performance differences, it's outright bugs.
Then, combine that with GPUs being fairly expensive, and fast moving when it comes to new features. Most game studios aren't going to buy 20 different GPUs and test their entire game on all of them. So games often ship with terrible performance or bugs on various different GPUs. And it's often not the game's fault: are games really supposed to detect your exact GPU model, and change code paths to work around a driver bug? That's crazy.
To combat this, GPU drivers often get updates after a game launch that fix the issues with performance/bugs for specific games at the driver level, when it detects that those games are running. So now drivers become a pile of game-specific hacks, making the problem even worse.
This is the reason Vulkan is so low level. The goal is to make sure drivers don't get horribly bloated, and games aren't working around driver-specific bugs (they still happen, just hopefully less). And when games want to use specific GPU features for extra performance, instead of drivers trying to magically improve normal operations, they can make a vendor-specific extension providing the new functionality that games can opt into when the feature is detected (e.g., raytracing). That's part of why Vulkan has so many more extensions than OpenGL does.
Vulkan may be low level, but it's intended to be so. By foregoing Vulkan support, Apple rejected any attempt at making a higher level API on top of Vulkan that would work on every system. Instead, WebGPU has to try and abstract over Vulkan/Metal/DirectX12 separately, which mostly works, but leads to a whole lot of clunk and longer development time than if Vulkan was the standard everywhere.
That's not to say macOS should never have made Metal. But by not adding Vulkan support in addition later on, they're really hurting cross-platform compatibility. Sure, now Apple can optimize their platform to the best of their ability (theoretically). But that comes at a huge overall cost to the ecosystem, for instance with games having poor support for macOS.
- gjsman-1000 5y ago"But that comes at a huge overall cost to the ecosystem, for instance with games having poor support for macOS." I don't know if I had this point edited in when you wrote this, but see point F: "F. Game engines actually support Metal - Unity, Unreal, LWJGL, the most common engines run on Metal fine. Don't use Metal as a scapegoat."
- genocidicbunny 5y agoMany game developers don't use any of these engines, and even when using an engine, the underlying graphics API can certainly matter. There's nothing saying that Unreal for example, has to support all the same rendering features in Vk and Dx and Metal. And even the same feature can look subtly different between different interfaces.
- jms55 5y agoA) Many games don't use these engines. The trend has actually been going in the direction of less custom engines, but a significant amount of games still do. B) Games might not have to deal with macOS if they're using an engine, but the engine themselves still do. This limits what engines can do to the least common denominator. And we all know Apple isn't the fastest when it comes to new standards or features. In the graphics world, that comes in the form of DirectX12 vendor-specific extensions, with Vulkan vendor-specific extensions a few months later, and then Metal support whenever Apple feels like copying it. Someone else in this thread linked an example about Metal lacking support for a type of atomic primitive that prevented the decoupled loopback algorithm from running on Metal. That means the author couldn't use WebGPU to implement the algorithm, and had to make an implementation in Vulkan and Metal separately (iirc all the details of this correctly, you get the general idea). And it _wasn't_ clear that they couldn't use WebGPU to begin with. The WebGPU spec had to actually be clarified based on the author's investigation. Engines and other APIs wouldn't have to deal with this if Apple just supported Vulkan.
- gjsman-1000 5y agoBut then we're back to the various pros and cons of Metal and Vulkan. A counterpoint would be that yes, it lacks the atomic primitive, but Vulkan's low-level design means that games would be less optimized for future devices if their developers stopped supporting them. An example of this would be how Metal runs on AMD GPUs, Intel iGPUs, and now Apple GPUs. Would a Vulkan-based implementation that was originally written for AMD GPUs be as optimized for Apple GPUs as a Metal implementation would have been? What about 5 years from now? My point is that there are minute details that are benefits and drawbacks to both, and the decoupled loopback would be one of them. I wouldn't be surprised if there are algorithms Metal can do but Vulkan can't.
- gfxgirl 5y ago> Then, combine that with GPUs being fairly expensive, and fast moving when it comes to new features. Most game studios aren't going to buy 20 different GPUs and test their entire game on all of them. This is mostly irrelevant for MacOS/iOS/iPadOS/tvOS. The number of people plugging in an external GPU on Macs is minuscule > for instance with games having poor support for macOS. Games don't have poor support on MacOS because of lack of Vulkan. They have poor support because pretty much no Mac (except maybe the newest M1 macs?) have gamer level GPUs and no market for high end games. Gamers basically know if you want to game, get a PC, and game devs know not to waste money on Mac ports.
- dragonwriter 5y ago> Games don't have poor support on MacOS because of lack of Vulkan. They have poor support because pretty much no Mac (except maybe the newest M1 macs?) have gamer level GPUs and no market for high end games. It is basically this: Gamers don't buy Macs (at least not as their only system, or their primary one for gaming) because there are few games. Few gamers buying Macs exclusively means there is little unique Mac demand for games (that is, demand that can't be tapped on another platform, because the potential buyer has it and will buy games on it). Little unique Mac demand for games means few games, and thus the cycle is closed. Breaking out of that is hard, and Apple would probably need to be the one to expend the effort, and Apple doesn't seem to want to do that.
- akira2501 5y agoBreaking out of that might be significantly easier if Apple entered the console space, which is something I sort of assumed they would eventually do. I'm not particularly clued in, though.. does anyone have a good reason why they haven't?
- sudosysgen 5y agoWhat's the value proposition for an Apple console? What competitive advantage is it going to have without undercutting some other product?
- pjmlp 5y agoIt is hard to avoid bloat and thousand code paths with Vulkan given the extension spaghetti, just like any Khronos API.