Metal is missing a lot of essential functionality, and it's hostile toward cross-platform development.
-
-
Replying to @EricLengyel @alexr
The minimum that I would need to even consider the Mac again is: * C API. * Shading language that supports standard syntax in GLSL/HLSL/PSSL/Cg. * Depth bounds test. * Timer queries (with same granularity as OpenGL). * Geometry shaders. (Not used much, but needed. No emulation.)
4 replies 0 retweets 7 likes -
Replying to @EricLengyel @alexr
* "Standard syntax" - do you mean you want to use GLSL/HLSL/PSSL/Cg verbatim? * What do you expect a GL style timer query to do on a TBDR architecture? * What important use cases are you using geometry shaders for?
3 replies 0 retweets 1 like -
Replying to @jhaberstro @alexr
For the shader syntax, here are a couple examples. These are just meant to demonstrate how Metal introduces unnecessary friction for cross-platform development.
1 reply 0 retweets 1 like -
If I want an output parameter on a function, I simply declare it ‘out’ in GLSL, HLSL, and PSSL: void func(out float param) In Metal, I have to write it like this: void func(thread float& param) The Mac requires special-case code that no other platform needs.
1 reply 0 retweets 0 likes -
In GLSL, HLSL, and PSSL, the functions that fetch an unfiltered texel all take signed integer coordinates. But in Metal, the equivalent function takes unsigned integer coordinates. Again, the Mac requires special-case code for absolutely no benefit.
1 reply 0 retweets 1 like -
The biggest problem with Metal shading language is the lack of global resources (textures, buffers). You need to give all resources as function params to main function and pass them around to every utility function. This is incompatible with text based shader node graph splicing.
2 replies 0 retweets 4 likes -
Replying to @SebAaltonen @EricLengyel and
Then there's the MSL atomics. If you want to do atomics to groupshared memory buffer, you need to change type to atomic<T> and simple stuff like assignment doesn't work anymore. Need to use atomic load/store instead. Need to wrap these to macros on every platform :(
1 reply 0 retweets 1 like -
Replying to @SebAaltonen @EricLengyel and
I had to rewrite Claybook particle simulator grid implementation for Metal, because Metal doens't support image atomics. I know this is hardware limitation, so I accept this. Raw buffer based grid wasn't any slower on PC either.
1 reply 0 retweets 1 like -
Replying to @SebAaltonen @EricLengyel and
This said, I would LOVE to have bit interleave (morton) instructions in shading languages / GPUs. If I get bit interleave instructions, I promise to never complain about image atomics anymore :)
1 reply 0 retweets 2 likes
I’m a graphics noob, but very curious: do y’all think Vulkan does (or will) solve these cross-platform problems?
-
-
Replying to @andreduvoisin @SebAaltonen and
My guess is it won't be much different than the OpenGL "situation". In theory GL is a cross-platform API, in practice it's not. Also if game consoles are your main focus you'll have to use the native 3D API anyway and write a thin abstraction layer with the things your game needs
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.