Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Xiao_Xi

macrumors 68000
Oct 27, 2021
1,628
1,101
@leman Would you consider the situation described in the link as an example of how the lack of native support of Vulkan in macOS can harm the current user experience in macOS?

I think it will benefit the Mac long-term, because it will enable a more feature-full, easier to use development ecosystem.
The situation between Metal and Vulkan reminds me of when Apple launched Apple Maps. The bet of creating a map app has paid off, but it affected the user experience at the beginning.
 
Last edited:

leman

macrumors Core
Oct 14, 2008
19,521
19,678
@leman Would you consider the situation described in the link as an example of how the lack of native support of Vulkan in macOS can harm the current user experience in macOS?

Not really. After all, the experience we are talking about is emulating the Windows environment under macOS to run Windows software.

However, it will simplify things for people doing ports if Metal had a low-level compatibility feature similar to descriptors in DX12 or Vulkan.
 
Last edited:

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
@leman Would you consider the situation described in the link as an example of how the lack of native support of Vulkan in macOS can harm the current user experience in macOS?


The situation between Metal and Vulkan reminds me of when Apple launched Apple Maps. The bet of creating a map app has paid off, but it affected the user experience at the beginning.

Going with your own API when you aren’t the market leader is always a bit of a gamble. But one thing Metal did was allow Apple to move faster than Vulkan. iOS had Metal in late 2014, Mac in late 2015, while Vulkan 1.0 didn’t finalize until Feb 2016. Metal has been getting iterated on, so it’s not like the API has been stagnant either. I don’t think the Apple Maps comparison in this case is particularly apt.

One thing about Apple Silicon specifically though that I wonder about is just how much existing code aimed at AMD-based Macs turn inefficient under Apple Silicon. Apple’s TBDR implementation, to my understanding, provides a number of efficiencies that you want to take advantage of to get the best performance. Apple has a talk going into detail on this for WWDC 2020. IIRC, some of the efficiencies of TBDR make up for the lower memory bandwidth compared to comparable GPUs, and allow it to punch above what folks would think of it’s weight class. But if your code happens to do things in a way that undermine those efficiences, framerate will suffer compared to what’s possible. As an anecdotal example, the M1 Max is supposed to contain a 55-60W GPU complex. Yet, I’ve yet to see games come anywhere close to that with it mostly being under 20W, making me wonder if there is a utilization problem at play or if something else is going on.

Based on the above, I wouldn’t be surprised if native support for Vulkan won’t necessarily help address framerate discrepencies, because it’s not the API per se that’s causing issues, but rather the assumptions made about how rendering passes should be performed that is different between Apple’s GPU architecture compared to AMD/Nvidia.

I’ll also point out that leman did answer your question earlier in the thread in a bit more detail. But the article itself makes points that suggest the issue is more the differences between Metal and DirectX. Ones that Vulkan may or may not help with.

P.S. Personally, I think it might a good idea for Apple to add some compatibility features to Metal that would more closely align to certain Vulkan and DX abstractions (wrt. to bindings btw). This will simplify the life of the porting houses without really sabotaging Metal itself, since Metal will stay superior. Also, add more advanced C++ support to MSL, an MSL to SPIRV compiler and a CUDA to MSL compiler. Metal shading language is vastly better than GLSL or HSL, if cross platform tooling were available it could help Metal adoption.
 
  • Like
Reactions: Xiao_Xi

Xiao_Xi

macrumors 68000
Oct 27, 2021
1,628
1,101
iOS had Metal in late 2014, Mac in late 2015, while Vulkan 1.0 didn’t finalize until Feb 2016.
- Vulkan ist a notoriously cumbersome and difficult to use API, Apple instead wanted something that devs could pick up quickly
- Vulkan is too much of a committee-designed common denominator API
- Apple's hardware vision would require a new "Apple Vulkan" dialect anyway
After reading more about Metal and Vulkan, I think Apple missed an opportunity to draw more developers to Apple hardware by not making Metal open-source in 2015/2016. Devs could have chosen it over Vulkan and helped Apple to close the gap with the market leader API, Direct3D. It worked with LLVD and it could have worked with Metal.

I wonder about is just how much existing code aimed at AMD-based Macs turn inefficient under Apple Silicon. Apple’s TBDR implementation, to my understanding, provides a number of efficiencies that you want to take advantage of to get the best performance.
Are IMR and TBDR GPU so different that they need a different way of programming?
 

EntropyQ3

macrumors 6502a
Mar 20, 2009
718
824
Are IMR and TBDR GPU so different that they need a different way of programming?
For optimal performance, yes.
And you might in some cases choose a different approach to achieve a visually equivalent result, because the quality vs. performance trade-off has shifted.
 
  • Like
Reactions: Xiao_Xi

leman

macrumors Core
Oct 14, 2008
19,521
19,678
After reading more about Metal and Vulkan, I think Apple missed an opportunity to draw more developers to Apple hardware by not making Metal open-source in 2015/2016. Devs could have chosen it over Vulkan and helped Apple to close the gap with the market leader API, Direct3D.

Im not that convinced. For a GPU API the GPU vendor support is much more important than dev support. Devs wholeheartedly supported the OpenGL Long Peaks draft back in 2008, but it’s not what the committee delivered.

I am very sure that Apple offered Metal as the base for Vulkan and that it has been shut down by other members. Metal was not low level enough for many of the decision makers, and others did not want to settle on features Apple was pushing.

And you might in some cases choose a different approach to achieve a visually equivalent result, because the quality vs. performance trade-off has shifted.

Do you have an example in mind where this would be the case?
 

Xiao_Xi

macrumors 68000
Oct 27, 2021
1,628
1,101
Do you have an example in mind where this would be the case?
This article describes the differences between TBR and IMR GPUs and discusses some use cases (for example, 2D Compositing or shadow map rendering) where architectures behave differently.
 

leman

macrumors Core
Oct 14, 2008
19,521
19,678
This article describes the differences between TBR and IMR GPUs and discusses some use cases (for example, 2D Compositing or shadow map rendering) where architectures behave differently.

Well, sure, there are many levels on which the architectures behave differently (do keep in mind though that this article describes the usual run on the mill Android TBR, which are still very different from Aplle TBDR). I was however wondering about the quality vs. performance trade-off that was mentioned.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.