Metal vs DirectX API

Discussion in 'macOS' started by B3yondL, Apr 12, 2017.

  1. B3yondL macrumors member

    B3yondL

    Joined:
    Mar 31, 2015
    #1
    Will it be possible to reach a point when Apple's Metal API will be easier to program for while offering greater performance? Has it already?

    Does anyone have a game that uses Metal API (like the new Deus Ex or something) and then compare that with the Windows bootcamp version? I'm guessing DirectX still smokes it but I want to keep tabs on how this API is progressing with devs either looking forward to adopt it or not.
     
  2. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #2
    Macs have a long history and reputation of not being a gaming friendly platform, couple that with the small marketshare and major game developers don't really look at the Mac platform as a viable source of revenue. Whether OS X is superior to DirectX is probably immaterial as developers will spend the time, and energy on where the money is first.
     
  3. leman macrumors 604

    Joined:
    Oct 14, 2008
    #3
    Metal is probably the easiest graphical API to work with at the moment. It also includes some really interesting tools that no other platform offer AFAIK. That said, Apple's reluctance to dedicate more resources to Metal and the fact that few eyes after its introduction it still has some glaring omissions, makes me question the entire enterprise. I am afraid that Apple has lost the momentum here. Metal is certainly mature enough for a lot of applications and its an attractive target for mobile gaming, but the situation on desktop looks not that nice.

    As to performance: modern APIs are all about efficiency. That is, their goal is to allow you to write code that doesn't slow you down artificially. There is always some sort of communication and setup overhead when managing hardware resources (here: GPU), and modern APIs attempt to bring that overhead down. In an ideal state, the performance should be identical. However, DX12, Vulkan and Metal make different choices. Metal focuses on convenience, which usually means more potential overhead. Vulkan on the other head focuses on pure efficiency, but its also very hard to work with.

    Finally, the main reason why games run faster on Windows is simply because Windows is a popular gaming platform (that generates a LOT OF money) and OS X is not. Hardware vendors generate a lot of their revenue from selling gaming GPUs. This has lead to an curious situation where Windows graphical drivers consist mainly of various hacks that speed up popular games. Have you ever wondered why a windows GPU driver is so large? Well, thats the main reason — it contains a lot of rewritten shaders and specialised driver code to make games run faster. This is ridiculous, but it "works" and most importantly, it makes money. Interestingly enough, the new APIs will probably improve this situation as they will make a lot (but not all) of these driver hacks unnecessary.

    P.S. I am currently developing a small simulation game in my free time. I use Metal on OS X and try to use Vulkan on Linux/Windows (but I didn't do much for the non-Mac version yet).
     
  4. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #4
    Also those vendors maintain the GPU drivers to a high degree in windows and you have a situation where the maker of the GPU is squeezing every last bit of performance out of the GPU. In Macs, for the most part, Apple handles the drivers.

    The hardware is another reason, PCs simply have the option of choosing some high end components that can really drive some of these high end games. Sadly Apple has a long history of not choosing the fastest GPU, and in the past Apple was known to downclock GPUs to make them slower (less heat and better battery life in laptops).
     
  5. leman macrumors 604

    Joined:
    Oct 14, 2008
    #5
    AFAIK, the majority of the OS X GPU driver code is written by the hardware vendors. Its just that OS X-specialised teams are smaller and have less incentive to spend time on aggressive optimisations, not even mentioning the game-specific hacks (which, as I have already mentioned, comprise the lion share of the Windows GPU driver).

    While you are certainly right that GPUs used in Macs are not the fastest available, that has nothing to do with driver performance though.
     
  6. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #6
    No, but it has everything to do with game performance. When a game manufacturer, looks at what the hardware that Macs typically have, will they be willing to invest $$ in porting the game over when it will not look or perform the same. Some games may not even make the cut in terms of minimum requirements.
     

Share This Page