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

Demigod Mac

macrumors 6502a
Apr 25, 2008
836
280
Does UT use Metal by default or does it need a command line switch?

Game runs like a dog even on a high end Mac. :<
 

Eric5h5

macrumors 68020
Dec 9, 2004
2,489
590
Unreal Tournament (and everything UE4) has no option for OpenGL, only Metal. It ran fine with a R9 280x when I tried it, but had some visual glitches.

--Eric
 

Demigod Mac

macrumors 6502a
Apr 25, 2008
836
280
On 1200p / 100% render scale. The main problem is constant hitching as it loads newly used effects, models and textures. Very bad at the start of a match but it evens out eventually. (Running on a Titan X)

I notice a similar thing happening in HOTS but it's not nearly as bad, and after about a minute or so the game runs perfectly smooth. Makes me wonder if Metal has an issue with preloading assets...?
 

Eric5h5

macrumors 68020
Dec 9, 2004
2,489
590
Could be an nVidia issue...I don't recall seeing that myself. Although I didn't play around with it for long, since it seemed pretty unfinished (as expected for an alpha).

--Eric
 

JordanNZ

macrumors 6502a
Apr 29, 2004
768
270
Auckland, New Zealand
On 1200p / 100% render scale. The main problem is constant hitching as it loads newly used effects, models and textures. Very bad at the start of a match but it evens out eventually. (Running on a Titan X)

I notice a similar thing happening in HOTS but it's not nearly as bad, and after about a minute or so the game runs perfectly smooth. Makes me wonder if Metal has an issue with preloading assets...?

This is a Nvidia issue with the web drivers and metal. It's not an issue on AMD and Intel.
Nvidias drivers need some work when it comes to metal.
 

jeanlain

macrumors 68020
Original poster
Mar 14, 2009
2,430
933
On 1200p / 100% render scale. The main problem is constant hitching as it loads newly used effects, models and textures. Very bad at the start of a match but it evens out eventually. (Running on a Titan X)

I notice a similar thing happening in HOTS but it's not nearly as bad, and after about a minute or so the game runs perfectly smooth. Makes me wonder if Metal has an issue with preloading assets...?
This would be shader compilation occurring mid game. Note that Maxwell- and Pascal-based cards never chipped with Macs. Also, there are at least 2 Metal games that don't support any nVidia card at the moment (Mafia III and Hitman).
 
  • Like
Reactions: marksatt

Aegelward

macrumors 6502a
Jul 31, 2005
528
54
UK
Any idea if Endless Legend or Endless Space 2 will transition to versions of unity that support metal?
 

marksatt

macrumors regular
Jun 26, 2013
230
236
This would be shader compilation occurring mid game. Note that Maxwell- and Pascal-based cards never chipped with Macs. Also, there are at least 2 Metal games that don't support any nVidia card at the moment (Mafia III and Hitman).

Correct sir. All three modern APIs (Metal, D3D12 & Vulkan) take the same basic approach to shader compilation and it is *very* different to D3D11 which most games & engines were designed for. D3D11 binds each shader (vertex shader, pixel shader etc.) individually and the driver is responsible for ensuring that these are compiled efficiently at draw-call time. Nvidia's Windows driver is *especially* well optimised for this. Developers therefore didn't have to care about the underlying complexities which for a very long time caused problems for AMD on Windows.

The new APIs are a bit more like OpenGL and expect you to bind your shaders & some of your render-state into a "pipeline" object and they all expose how slow this operation is, so it takes a lot of engineering work to avoid the stalls caused by creating these at draw-call time.

This is one of the reasons that Obduction on Mac has a big runtime shader-cache that slowly accumulates and increases application load times - it saves you from the worst hitches in-game.
 

jeanlain

macrumors 68020
Original poster
Mar 14, 2009
2,430
933
Ah, there you are Mark! :)
Regarding shaders compilation, is it possible to ship precompiled shaders with a macOS Metal game, or are there too many GPUs to support?

And what are your thoughts on Metal 2?
 

marksatt

macrumors regular
Jun 26, 2013
230
236
Ah, there you are Mark! :)
Regarding shaders compilation, is it possible to ship precompiled shaders with a macOS Metal game, or are there too many GPUs to support?

And what are your thoughts on Metal 2?

Not gone far. WWDC was crunch-tastic and I'm still dealing with the fallout.

No, Metal doesn't have an API to serialise compiled pipelines to ship them precompiled. As the pipelines are GPU specific it would be limited in similar ways to GL's program binary extension and in practice we wouldn't be able to precompile all the different variations for the GPUs that Apple ship.

The additions to the Metal API and shader language are again good steps forward - though as always I still want more - with Indirect Argument Buffers being the most work to support but also the most valuable.
 

Janichsan

macrumors 68040
Oct 23, 2006
3,037
11,024
I can't rule out that it's hardware specific (I tested it on an AMD GPU), but all the issues I saw were noticeable during the benchmarks.
By the way, just gave it another spin and the Metal renderer in War Thunder is indeed improving: many of the rendering issues I saw earlier are fixed in the most recent version, but not all (reflections are still messed up, for instance).
 

Ferazel

macrumors regular
Aug 4, 2010
146
96
Not gone far. WWDC was crunch-tastic and I'm still dealing with the fallout.

No, Metal doesn't have an API to serialise compiled pipelines to ship them precompiled. As the pipelines are GPU specific it would be limited in similar ways to GL's program binary extension and in practice we wouldn't be able to precompile all the different variations for the GPUs that Apple ship.

The additions to the Metal API and shader language are again good steps forward - though as always I still want more - with Indirect Argument Buffers being the most work to support but also the most valuable.

Again, congrats on your work for WWDC was cool to see GPUs and gaming be emphasized.

I confused though by what you're describing. I thought one of the things that Apple wasn't happy with OpenGL about was that you couldn't pre-compile the shaders using that API and everything had to be compiled at runtime. One of the things that they touted when Metal was released was that you could compile the shaders at build-time. I'm referring to this document:
https://developer.apple.com/library...rammingGuide/Dev-Technique/Dev-Technique.html
Does the shader cache that you described for Obduction somehow storing the GPU assembly for the shader or is storing the IR that Apple described?

Or is the problem you're describing not specifically a shader compilation hit, but a problem with the API switching up the RenderCommandEncoders and leaving the drivers to try to manage the context switching the RenderPipelineDescriptors the problem?
 

marksatt

macrumors regular
Jun 26, 2013
230
236
Again, congrats on your work for WWDC was cool to see GPUs and gaming be emphasized.

I confused though by what you're describing. I thought one of the things that Apple wasn't happy with OpenGL about was that you couldn't pre-compile the shaders using that API and everything had to be compiled at runtime. One of the things that they touted when Metal was released was that you could compile the shaders at build-time. I'm referring to this document:
https://developer.apple.com/library...rammingGuide/Dev-Technique/Dev-Technique.html
Does the shader cache that you described for Obduction somehow storing the GPU assembly for the shader or is storing the IR that Apple described?

Or is the problem you're describing not specifically a shader compilation hit, but a problem with the API switching up the RenderCommandEncoders and leaving the drivers to try to manage the context switching the RenderPipelineDescriptors the problem?

You can compile shaders to bytecode at build time, but you can't precompile pipelines (shaders + some render state).

Compiling to AIR first means there is no hitch creating the shader initially unlike GL where the driver has to compile the text into a bytecode internally.

The Metal pipeline creation cost is similar to the cost of creating a GL program (incl. overhead of the first draw call). Both Vulkan and D3D12 impose the same pipeline creation costs as this is the unavoidable point at which the driver converts from a vendor neutral intermediate into GPU specific machine code.
 
  • Like
Reactions: Ferazel

marksatt

macrumors regular
Jun 26, 2013
230
236

PJivan

macrumors 6502
Aug 19, 2015
450
453
Got some news for this thread, folks -- we're working on the macOS version of BioShock Remastered, which will use Metal.

Can you tell us something about Metal 2? Have you guys tested it? Will Warhammer total war 2 support it or when we can expect to see further improvement with it? It would be nice to have your opinion on this.
 

Janichsan

macrumors 68040
Oct 23, 2006
3,037
11,024
Got some news for this thread, folks -- we're working on the macOS version of BioShock Remastered, which will use Metal.
Yay. You know which games also would look great on the list of released games using Metal? Deus Ex: Mankind Divided and Dirt Rally.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.