Realistically, since so many games now are made in an engine such as Unity or Unreal, porting games has already been mostly trivial a lot of the time. It's not as common these days to have to actually port a game from scratch where you worry about the details of Vulkan, Metal, etc. Now you have to worry about developers signing up to be published by Microsoft, who then prohibits the game from appearing on non-Microsoft platforms even though there are no technical issues preventing it.I wish everyone would just stop using DirectX and Metal and just use Vulkan. That way, there's only one 3D library and in the future, porting games to different platforms is a lot easier.
Here there is good list of Metal gamesThere are already a number of metal games for macOS with great performance.
https://forums.macrumors.com/threads/list-of-mac-metal-games.2045606/
Obviously the mac is not, and probably will never be, as good as Windows for gaming. If only because the market share is so small.
Metal already showed great performance compared even to Windows.
Here's one: https://egpu.io/forums/mac-setup/me...fps-on-macos-10-12-4-fhd-ultra-high-settings/
[doublepost=1519671422][/doublepost]
There are already a number of metal games for macOS with great performance.
https://forums.macrumors.com/threads/list-of-mac-metal-games.2045606/
Obviously the mac is not, and probably will never be, as good as Windows for gaming. If only because the market share is so small.
Not in my tests. Metal still at least 15 frames slower than Windows in the games I tried however it's significantly faster than OpenGL.
When they get to < 10 fps difference, then we can start considering removing our bootcamp partitions for gaming.
That's Metal vs old Direct X 11 title
Maybe I'm wrong here, but my understanding is that you do not have to translate the SPIRV shaders to MSL at runtime. MoltenVK apparently comes with a separate conversion tool that's supposed to allow you to do this beforehand, and then you can pass your converted MSL shaders directly to your Vulkan code.Moreover the approach MoltenVK takes to recompiling shaders makes it infeasible to impossible for them to be supported without significant work and performance penalties. Metal doesn’t have direct equivalents so the MoltenVK library would need to defer SPIRV to Metal translation until said shaders are used together in a Shader Pipeline at runtime. Only then could it recompile them to Metal and emulate all the necessary behaviour but this would result in a big performance hit on the CPU.
Metal Shaders
Metal uses a different shader language than Vulkan. Vulkan uses the new SPIR-V Shading Language (SPIR-V), whereas Metal uses the Metal Shading Language (MSL).
MoltenVK provides several options for creating and running MSL versions of your existing SPIR-V shaders. The following options are presented in order of increasing sophistication and difficulty:
You can mix and match these options in your application. For example, a convenient approach is to use Runtime Shader Conversion for most SPIR-V shaders, and provide pre-converted MSL shader source code for the odd SPIR-V shader that proves problematic for runtime conversion.
- You can use the Runtime Shader Conversion feature of MoltenVK to automatically and transparently convert your SPIR-V shaders to MSL at runtime, by simply loading your SPIR-V shaders as you always have, using the standard Vulkan vkCreateShaderModule() function. MoltenVK will automatically convert the SPIR-V code to MSL at runtime.
- You can use the standard Vulkan vkCreateShaderModule() function to provide your own MSL shader code. …
You can use the MoltenShaderConverter command-line tool found in this Molten distribution package to convert your SPIR-V shaders to MSL source code, offline at development time, in order to create the appropriate MSL code to load at runtime. The section below discusses how to use this tool in more detail.
Maybe I'm wrong here, but my understanding is that you do not have to translate the SPIRV shaders to MSL at runtime. MoltenVK apparently comes with a separate conversion tool that's supposed to allow you to do this beforehand, and then you can pass your MSL shaders directly to your Vulkan code.
It's surely an extra step during the porting process, but you wouldn't have to deal with the performance hit.
@marksatt
Good to hear some input from someone with good insight.
Quite a bit off-topic, but do you know what's going on with the major pauses/lag in between seemingly good frame rates in the MacOS version of Fortnite?
https://www.dropbox.com/s/nzt0h1s9hvrzgad/Fortnite_major_hiccups.m4v?dl=0
Or is the problem I see perhaps related to the NVIDIA Web Driver which is required for the GTX 970 I have to work in MacOS? Sorry, maybe I should report this somewhere else…
In that case, forget that I said something.That’s what I said sir, ...
In that case, forget that I said something.
Why? What would be the issue there? Lacking hardware support on iOS devices?Mac->iOS would get harder though.
Why? What would be the issue there? Lacking hardware support on iOS devices?
Yes it seems all Fortnite users have this issue, I get even 2-3 seconds lag with 60fpsThat’s what I said sir, by doing this offline for SPIRV you avoid the runtime performance hit BUT you CANNOT use some/all Metal specific feature and you CANNOT emulate geometry or tessellation shaders. Emulating them requires the full set of shaders in a pipeline so that you can rewrite them to use Metal’s similar but not equivalent features. That is known only at runtime in most engines - not all though. That means combining vertex + (hull and/or geometry) shader stages into compute shaders that must run in an earlier compute command buffer, separate to the later draw call that uses the (domain + pixel shader). Plus all the associated buffer allocations and resource binding shenanigans- it’s actually bloody hard work to get right!
[doublepost=1519686438][/doublepost]
Looks like it is either texture streaming or shader compilation or a combination of the two. I’ve explained the challenges of dealing with the initial shader setup at runtime, even with precompiled shaders, elsewhere. It still isn’t a solved problem in UE4 or Fortnite and it likely never will be perfect. This isn’t the forum to report problems - that should be done over at the Fortnite forums and the feedback mechanism.
Well the caveat is that it's not fully functional (e.g. no tessellation), at least for now.Vulkan fully functional on macOS? Sounds to good to be true, taking it w/ a very large grain of salt