SPIR-V support

I know that these forums are much less active than they should be, but I am still posting this in the hope that some people (and hopefully someone from Apple) see it. I am also sure that I am not the first one to think of it, but I would like to raise the "awareness" on this topic


Now that Khronos has released SPIR-V specification, we have a cross-platform language-agnostic high-level bytecode for specifying shaders. I believe that it would be a big benefit for Metal to have a SPIR-V interface. I am sure that the Metal IR already has a high degree of resemblance to SPIR-V and the translation between two levels can be done in a fairly simple way (or ideally, Metal could adopt SPIR-V itself). Benefits are as follows:


1. It would be much easier to port between Metal and other APIs (like OpenGL or Vulkan), simplifying cross-plaftorm development

2. Apple developers would get access to a vast shader library and third-party tools

3. A stable IR promotes better quality software

Cross platform is not the goal with iOS and OSX. While it might make your job easier porting your

android, windows or other platform code, it does nothing to benefit iOS nor OSX. In other words,

don't hold your breath.

But of course it does!


1. It attracts more high(er)-quality games to OS X

2. It allows Apple to leverage the ressourses of the open-source community (such as optimisers and code analysiers)

3. It allows the devepers to access community shader libraries

4. It makes it easier for the developers to use Metal and OpenGL in the same project (which is useful to support older hardware)


Furthermore, in my particular case, I am not interested in porting any Windows app to OS X, its more the other way around. I want OS X to be my primary game development platform, and I am interested in porting my OS X code to Windows/Linux. Open-sourcing Swift is the first (and very important) step. Making Metal IR would be another one.

If that's all true, then shouldn't the "Open Source Community" produce all of the necessary work to get SPIR-V working on metal?

And I am sure they will. Still, it would be quite helpful if Apple offered at least some basic support (e.g. a stable IR specification). And quite honestly, there is nothing speaking agains Apple using SPIR-V for their Metal IR in the first place. It would be a win-win situation for everyone. Apple gets less code to maintain and devs get more robust and portable shaders.

No, sorry, I don't see how that's supposed to work out as a win-win situation. "Let's get stuck implementing someone else's standard, instead of one we're writing for our own specific purposes" is what you're proposing for Apple.


Because the situation with SPIR-V is going to be OpenGL all over again.


"I, as a developer who doesn't want to be tied to Apple for my shaders, want Apple to make my shaders less tied to them."

Shameless (but hopefully helpful) plug...


The Brenwill Workshop has a project to do exactly this, as part of the evolution of our MoltenGL (and upcoming MoltenVK) products.


...Bill

Apple doesn't care about gaming on Mac, they care about gaming on iOS. Not getting ports of PC games is really not a big concern for Apple as they never really had any footing in that market anyways.


This move seems to be a means to try and lock in devs to iOS (many mobile games are developed primarily for iOS and ported to Android and PC afterwards.)


I guess we'll see how that works out for them, on the desktop front certainly lots of devs will just stop bothering with Mac ports and a lot of mobile devs that don't already use engines like Unity or Unreal will probably just stick to OpenGL ES. But certainly some devs will make Metal and iOS exclusive games.

There's certainly not been enough noise raised about this; only a handful of topics even relate to Vulkan.

I bought my first mac today to port a single library, an addon for Node.JS; and it was too much work to maintain and work on a virtual image for this one purpose. I don't use mac, but others do.

I don't play games on mac, but others do.

I though that Vulkan had support for Mac also (or vice versa), and am incredibly disappointed that they have not provided sujpport for Vulkan. They then cut out the play field for many independant developers.... They don't want software for their platform I guess. Apple doesn't write software. But they certainly do their best to make sure noone else will either.


Whatever; I know, unity and Unreal support enough variations and even condescended to supporting Metal, and I should just be using a standard engine, to make my game that much more hackable by third parties.

Was really looking forward to being able to drop split support for Framebuffer, OpenGl, OpenGL2, GLES2, D3D(Although that nevery really worked beyond the barest minimum level) It's of no importance to me to be pigeon-holed into Windows any more than it would to implement Metal and get pigeon holed into Mac.

Sure, there's some emulation layer, that I can't even use, because I'm not making any money for the game during development, it's certainly not worth the money to buy that; and a trial is of no use because the 3d subsystem it's not a primary pursuit and will expire before I really make much headway there.

Sure; I know... just stick with WebVR right? and don't worry about doing bare metal games? Sure, that's a solution too.

The Idea that it's better to invent than to cooperate is insanity and the reason I've had less than 0 interest in mac for 30 years, which was only recently brought up to 0.1% (slightly positive enough to give it a honest try)... but now even that I can't imagine any serious games really being developed for Mac that won't just as easily be written for the majority platforms (either android or PC) first.

Yes, Apple's goal is not gaming; it's not servers; but anything else is better served by a Chromebook honestly. Oh I guess for some reason I have yet to grok, video editing and graphics people have an affiniity for Mac. Such a narrow market even available I'm really surprised Apple has any market presense at all.

Hello d3x0r,

The last time I checked, Apple had upwards of a billion customers. That's a pretty good market presence.


I'm not sure what your question is. You are looking for Vulkan support? And you didn't find it? Not even in the post right above yours?

SPIR-V support
 
 
Q