Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is no resolution for this question yet, too early to celebrate anything.


Ah, I see, thanks for clarifying. I misread the post then, since it mentioned SPIR-V.

Too bad Apple not only refuse to support Vulkan, but try to prevent using SPIR-V as well.


They just want to make sure we aren't depending on Khronos too much. It's a reasonable thing to want for the group.

As for Firefox, the WebGPU implementation uses the infrastructure we have for Vulkan Portability, and so consuming SPIRV is natural.


What I care about is having a modern shading language not stuck being a C dialect, and good GPGPU debugging.

If whatever Apple does forces Khronos to be more innovative, moreso the better.

Without CUDA's winning strategy regarding multi-language support, SPIR-V and SYSCL would never had happened.


During Metal Shading Language's development, there were multiple opportunities to engage for Apple to open up their shading language toolchain, and make MSL a standard that would be respected by multiple people. They ignored that advice, and now lots of people grumble about writing MSL. It is, in many people's eyes, a quite decent shading language, but it's "different enough" and for a niche enough platform (in the games world) that it pays the price heavily. Tooling is pretty abysmal, and GPU debugging in Xcode is not the greatest experience.

Now, with that said, Apple did not propose MSL to the WebGPU working group either. Apple originally proposed a hilariously underspecified fork of HLSL called WHLSL which had three goals: 1. Be a safe shading language for the web, 2. Be compatible with existing HLSL content, 3. Add pointers.

Nobody ever justified the existence of that last one to me or the rest of the group, other than making the Metal implementation slightly easier for Safari, since Metal's binding model is based on pointers, and coincidentally, the Safari pre-release only supported binding pointers, and not the standard HLSL way of doing things. But still, the WHLSL proposal was interesting to a lot of people because HLSL seemed like a good language to start from.

After a lot of debate, Apple secretly went back to the drawing board, and released a revised version of the language, WSL, which dropped the goal of HLSL compatibility but still has pointers for some reason. Nobody has ever explained why it has pointers, despite everyone continuing to ask. The goals are still there if you want to read them [0].

https://github.com/gpuweb/wsl#goals


Thanks for the summary. It highlights how "collaboration" from Apple's perspective works. Throwing something over the fence, and then going back to discuss things in secret.


Thanks for providing an overview.


> a modern shading language not stuck being a C dialect

SPIR-V allows you to compile from whatever you want, and avoids the hideously complex beast that is C++ needing to be part of the browser's API.


The track record of industry GPU language development is very poor (arguably even disastrous).

I worry that we now just count on nice languages / compilers magically appearing deus ex machina, and we end up not having any. Big multiplatform frameworks like Unity will just put a SPIR-V backend on their existing tooling.

The rest of us will be stuck with POC-quality GLSL transpiler tools, without the browser devtools and other tooling support that we slowly got over the ~10 years of WebGL history.

(I'm not saying GLSL is that excellent, just that could be heading backwards from current almost-good-enough GLSL implementation quality in WebGL.)


You already see this with Vulkan, where many studios opt for middleware engines instead of having to deal with all boilerplate themselves.

You see this on Android and Switch, where most Vulkan related stuff, is based on Unreal and Unity tutorials.


Metal Shading Language is a C++ dialect. HLSL is as much of a C dialect as GLSL is. And I would argue that C++ provides no benefits over C for shading languages.

I prefer GLSL to Metal Shading Language.


Thankfully all proprietary shading languages have moved on from GLSL.

Indeed, I really appreciate MSL being a C++ dialect.


Moved but remained proprietary. So the problem is not solved. Language shouldn't be proprietary to begin with. It's an obsolete and invalid practice from the last century.


Apparently not, given the monthly occurrence of FOSS projects that decide to go dual license, or even back to proprietary, because this century practice doesn't cover their existence and life responsibilities.


For languages? That's a dead end really. That's why whatever Apple will produce will also be dead, as long it's proprietary. Apple is stuck in that mentality and has hard time getting out of it.


Given the quality of Khronos SDKs and stubborness to C bindings, that might not be a bad thing.

As they have learned the hard way with OpenCL, most devs like to be pampered with modern toiling.

Heck, it is thanks to Microsoft that we have glTF 2.0, and NVidia for any kind of usable C++ Vulkan bindings.


> Given the quality of Khronos SDKs and stubborness to C bindings, that might not be a bad thing.

None of which has anything to do with SPIR-V? It's a standardised intermediate language, not an API, and it has no dependency on Khronos tooling.


It kind of has, if Khronos never provides anything better, as it has been proven before, hardly anyone will step up to improve it, until the standard starts being put aside in preference to proprietary middleware or competing APIs.


There is nothing wrong per se with SPIR-V to provide anything much better. What you said has indeed nothing to do with the intermediate language itself.


It's relevant to what you choose to use as the standard. A language can be fine on its own terms, but also you should only install it with a layer on top and not by itself.


SPIR-V is fine as a standard. What you put on top and transpile into it should be completely flexible. I.e. no need to mandate higher level languages.

And if anyone wants to make a better higher level language and compiler for it to generate SPIR-V, they are always welcome.


Using C bindings you can plug in any language you want, C ABI is simple. Try that with C++ or anything of the sort, and you'll be in trouble.

If you want to improve quality - anyone can contribute and improve, instead of like Apple trying to sabotage and derail.


Yeah, around 500 boilerplate lines of code to draw a triangle on Vulkan, plus having to going hunting for features that every graphics application requires and all other APIs provide on their SDKs.

With Khronos APIs, every newbie graphics developer learns to build their engine from day one.


It's not so easy to contribute to Khronos.


Surely easier than collaborating with Apple who are extreme lock-in proponents.

See for example projects like dxvk, which affected Vulkan spec:

* https://www.youtube.com/watch?v=1fU4w2ZGxH4&t=12m21s

* http://jason-blog.jlekstrand.net/2018/10/transform-feedback-...

Good luck for such thing happening with anything Apple related.


Spec development? No.

But for bug reports, debugging and fixing bugs in the shader compiler, validation layers, etc they are pretty responsive to issue reports and pull requests.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: