Lets talk about Metal

Discussion in 'macOS Mojave (10.14)' started by Jyby, Jun 4, 2018.

  1. Jyby macrumors 6502

    Joined:
    May 31, 2011
    #1
    The Metal demonstration was pretty cool! Are we going to see anything significant in terms of eGPU support?
    Nvidia support? Does anyone have the Metal demo video?
     
  2. alex00100 macrumors 6502

    Joined:
    Mar 17, 2011
    Location:
    Moscow, Russia
    #2
    All I want is for Adobe to finally support egpus! Also they haven't actually mentioned any improvements to metal or egpu's except just mention them.
     
  3. Jme Saunders macrumors member

    Joined:
    Mar 5, 2015
    #3
    I really wanted to see Vulkan support, but all Apple did was drop OpenGL support instead.
     
  4. zooole macrumors newbie

    zooole

    Joined:
    May 22, 2016
    #4
    MoltenVK takes care of that.

    OpenGL and CL will be phased out, and that will have some backslash.
     
  5. cube macrumors Pentium

    Joined:
    May 10, 2004
    #5
    macOS RIP.
     
  6. Nermal, Jun 4, 2018
    Last edited: Jun 5, 2018

    Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #6
    I heard that the licensing around it makes it unsuitable for smaller developers, so it'll be interesting to see whether it becomes used in practice.

    Edit: As pointed out below, this is no longer the case.
     
  7. Merode macrumors 6502

    Merode

    Joined:
    Nov 5, 2013
    Location:
    Warszawa, Poland
    #8
    Dropping OpenGL will be terminal for Mac gaming until developers adopt Vulkan (in about 2-4 years). Even then if Apple doesn't play nice with Valve, they might drop MoltenVK which will be terminal for Mac gaming, period.
     
  8. Cougarcat macrumors 604

    Joined:
    Sep 19, 2003
    #9
    It doesn’t really matter for new games. OpenGL was already absurdly behind that Metal is the only realistic option even if OpenGL wasn’t deprecated. All of Feral’s latest games have been Metal only, and they had to wait for Metal 2 for some of them.

    As I understand it, MoltenVK is really Metal too, just in a Vulkan wrapper.
     
  9. febLey macrumors member

    febLey

    Joined:
    Nov 26, 2016
    Location:
    Germany
    #10
    MoltenVK was open sourced under the Apache 2.0 license at the beginning of this year.
    So I don't think that's a problem anymore.
     
  10. homohurre123 macrumors member

    Joined:
    Jun 5, 2018
    #11
    Who knows If apple does well with those kind of "universal Programms" we might see developer start to get more interested in Apple and the Mac especially. Imagine having the possibility to bring your Game to the iPhone iPad Apple TV and the Mac without having to create different versions for them.

    Apple Tv might be strong enough in the next generation to compete with something like the Switch. Ipad Pro and Iphone will get insanely fast. If apple would make sure to create some good gaming peripherals for all of those Platforms Metal might be a strong possibility for the major Game developers.

    Also Sony would look pretty badly if this happens. Microsoft has Xbox and Windows (Tablet, PC and Console) Apple would have IOS TV OS and Mac OS ((Tablet,Phone, PC and Console) and Sony would rest with their one platform which has to compete with Nintendo and Microsoft.
     
  11. Merode macrumors 6502

    Merode

    Joined:
    Nov 5, 2013
    Location:
    Warszawa, Poland
    #12
    Yeah, Apple's implementation of OpenGL was very weak. Not only severely behind schedule but also very poor when it comes to performance hence why most OpenGL games worked better in BootCamp under Windows.

    Metal will be adopted only by select developers, like Blizzard, who always worked closely with Apple. Other AAA developers won't bother, for example id Software. That's why MoltenVK is very important for Mac gaming - it's a translation layer between Vulkan and Metal.
     
  12. cube macrumors Pentium

    Joined:
    May 10, 2004
    #13
    OpenGL and OpenCL are not obsolete. They are not replaced by Vulkan.
     
  13. leman macrumors G3

    Joined:
    Oct 14, 2008
    #14
    Ah, yes, that is an interesting topic. It is true that Apple at some point stopped adopting new versions of OpenGL (I think it was around 4.1), but lets talk about the performance aspect.

    There are two main reasons why OpenGL performance was lacklustre on the Mac side. First has to do with the driver model. In Windows, the OpenGL implementation is left solely to the driver. Your application kind of hooks directly to the driver-provided API and that's it — the hardware vendor controls every single aspect. On Mac, OpenGL works via an Apple-provided driver interface. The OpenGL front is implemented by Apple, and it then communicates with the GPU driver (this is similar to how DirectX works on Windows). This of course creates more overhead and potentially makes the driver implementation less efficient (since OpenGL is a rather messy API to start and you get a lot of useless abstractions).

    The second one is more tricky. The fact is that Windows drivers contain tons of game-specific optimisations. Ever wondered why these drivers take so much space? GPU manufacturers make a lot of money from gamers, and they do everything they can to portray their GPUs as superior. They would have game-specific driver implementation, game shader code rewrite/injection etc. etc. This is what ultimately gives that 20-25% performance edge in games to Windows. Since the Mac driver code doesn't have all these optimisations and hacks, it simply can't be as performant.

    The problem, in the end, is with the API itself. Both OpenGL and older versions of DirectX were not particularly efficient in the way how they presented the hardware capabilities to the client software. Since a specific game has a particular strategy of utilising that API, the driver can improve the performance by anticipating that strategy and preparing things accordingly. If the only language you have for communication is not very good, domain-specific knowledge can help a lot.

    Now, enter new APIs like Vulcan, DX12, Metal. Their execution model is much closer to how the hardware actually works. This means that the communication layer between the game/app and the GPU becomes thinner. Drivers are easier to write, and knowledge about how the game works doesn't help out that much, since the game is probably already using the GPU quite efficiently. This is also probably the reason why you see AMD performing so much better under DX12/Vulcan — has to do with the quality of their drivers.

    Once Apple manages to remove the bugs and kinks from Metal, we could actually see some decent gaming performance on Mac. Again, for many games this will come essentially free since they already use an engine that supports Metal (e.g. Unity).

    As to OpenGL... I don't think that it will be removed from MacOS any time soon, but one certainly should stop using it for new software. There is simply no advantage to it anymore. I am very fond of OpenGL, but it belongs to a museum and no amount of bandaids will change that.
    --- Post Merged, Jun 5, 2018 ---
    And that is a tragedy, really. Vulcan is so complex that only few very skilled developers can hope to achieve good result with it. So OpenGL is still kept alive as a "easier", more friendly alternative, despite the decades of legacy garbage it carries around. This promotes bad driver quality, software bugs and portability issues.
     
  14. cube macrumors Pentium

    Joined:
    May 10, 2004
    #15
    No, one should stop using Macs. It is not the job of application developers to write drivers.
     
  15. leman macrumors G3

    Joined:
    Oct 14, 2008
    #16
    What in my post suggested that you have to write a driver? Just use a modern API alternative or a middleware that supports it. Not to mention that working with Metal is so much easier...
     
  16. cube macrumors Pentium

    Joined:
    May 10, 2004
    #17
    If no available middleware cuts it, you basically have to write your own driver in Vulkan.
     
  17. cmaier macrumors G4

    Joined:
    Jul 25, 2007
    Location:
    California
    #18
    iOS seems to do ok without it.
     
  18. leman macrumors G3

    Joined:
    Oct 14, 2008
    #19
    I think you might be trivializing a bit what writing a driver entails ;) anyway, if you don’t want to mess with manual memory management etc., there are high-end wrappers around Vulcan that will do it for you, e.g.: https://gpuopen.com/gaming-product/anvil-vulkan-framework/
     
  19. cube macrumors Pentium

    Joined:
    May 10, 2004
    #20
    Yes, I know about that. I think you still would have to take care of a lot of the stuff the OpenGL driver does for you. That's the point.
    --- Post Merged, Jun 5, 2018 ---
    iOS is not a desktop platform and it has OpenGL ES.
     
  20. Jyby thread starter macrumors 6502

    Joined:
    May 31, 2011
    #21
    I think most new games are being made with Unity or Unreal Engine, which both support Metal. Most game developers are not developing their own game engines anymore.

    Also- I think developers who support multiple graphics apis already know how to support Metal. It just depends on if developers see support for OpenGL still worth it... If you support DX12, why use OpenGL? So developers graphics apis might just consist of Dx12, Metal, and Vulken.

    If you look at OpenGL's page it is dotted in Vulken news... I think OpenGL is on it's way out.

    And if Apple open sources Metal, like they did swift, I think we'll see Kronos graphics snubbed out completely in the future...

    Heck maybe Apple didn't have enough political influence at the Kronos OpenGL group to really change anything?
     
  21. leman macrumors G3

    Joined:
    Oct 14, 2008
    #22
    Maintaining a huge driver infrastructure that has to support an massive, suboptimal API which has grown over decades puts a lot of burden on the GPU makers and is not really justifiable just because some people are afraid of some real programming. Its hardly the responsibility of the OS or the driver to give you a convenience layer. OpenGL has its uses as a legacy API, and its relevant subset can be easily implemented on top of Vulcan or Metal.
     
  22. cube macrumors Pentium

    Joined:
    May 10, 2004
    #23
    No, if the GPU maker optimizes OpenGL, the same does not need to be done in every application that programs directly against a low level API. They get paid for that.
     
  23. leman macrumors G3

    Joined:
    Oct 14, 2008
    #24
    The game I am developing as a hobby is only using Metal and Vulkan. Metal is a pleasure to work with, a truly beautiful API, even though it has some bugs. Vulkan is kind of horrible :D

    I don't think that will ever happen. Also, what do you mean by "Kronos graphics snubbed out"? Metal is certainly not going to replace Vulkan. Vulkan is a lower-level API that allows to use the hardware more efficiently — with some effort.
     
  24. cube macrumors Pentium

    Joined:
    May 10, 2004

Share This Page