4 ms·
> It’s designed to be efficiently implemented on top of the vendor APIs, so platform vendors can’t block it. Their choice of inventing their own shading langua
by j-pb 5y ago
> It’s designed to be efficiently implemented on top of the vendor APIs, so platform vendors can’t block it.
Their choice of inventing their own shading language instead of using the ONE standard that the industry finally could agree on (SPIRV) makes me very pessimistic.
Apple is purposefully crippling stuff to retain their App dominance yes, but Apple IS a major part of WebGPU. So it never had a chance and was doomed to fail from the very begining.
Google even had a presentation titled "regaining developer trust" on this topic, but WebGPU continued to push WGSL nevertheless.
- krona 5y agoSPIR-V is an intermediate representation and WSGL compiles to it. WSGL is (or will eventually be) a w3c specification. I fail to see where your point about trust fits in to that.
- j-pb 5y agoApple + Mozilla did a bait and switch on developers in a textbook case of: Embrace, Extend, Extinguish The original google proposal was to simply use SPIRV. A compromise was then settled for the intermediary language to be isomorphic to SPIRV, removing some of the warts and edges of it and make verification easier. However, Apple with the help of the Mozilla folk successfully managed to twist the semantics into something that is no longer easy to translate from and to. Game developers don't want to work with WSGL, the whole point of the new WASM and WASI ecosystem is to allow devs to bring their own tools. This is especially bad for something like a shader language, where you want to squeeze every bit of performance out of the hardware, often with hand rolled instructions. Having the browser run a mangled version of the SPIRV that you or your toolchain/engine e.t.c. produced is simply not acceptable.
- the_duke 5y agoAs the draft says [1]: > Trivially convertable to SPIR-V > Constructs are defined as normative references to their [SPIR-V] counterparts > All features in WGSL are directly translatable to [SPIR-V] > Features and semantics are exactly the ones of [SPIR-V] > Each item in this spec must provide the mapping to [SPIR-V] for the construct So WGSL is essentially just an alternative representation for SPIR-V. But I don't see how this compromises the viability of webgpu. [1] https://www.w3.org/TR/WGSL https://www.w3.org/TR/WGSL
- kaba0 5y agoWithout much experience in the topic, why was the “de facto standard” SPIR-V was not chosen then instead? If they are so similar, is there any advantage of a new format?
- codeflo 5y agoHere’s a comment summarizing the official rationale: https://github.com/gpuweb/gpuweb/issues/847#issuecomment-642883924 https://github.com/gpuweb/gpuweb/issues/847#issuecomment-642... TBH, I don’t find those arguments convincing, but then, WebGPU is largely a political compromise, not a technical one. In a politics-free zone, they’d have standardized a “WebVulkan”, not made an entirely new thing. That would have been on the table, but Apple vetoed it. The same for a “Web-SPIR-V”. However, I also don’t think it’s that big of a deal in the grand scheme of things. I’m glad we have a viable standard at all.
- j-pb 5y agoThat was the original sales pitch which has been abandoned in favour of "Lets make a Rust-like language for shaders!". It's a textbook case of: Embrace, Extend, Extinguish Google tried to save it, but that proposal was rejected: https://docs.google.com/presentation/d/1ybmnmmzsZZTA0Y9awTDUNqkkMo3a2N7wR4Z04SQinPg/edit#slide=id.g6176d1223e_0_0 https://docs.google.com/presentation/d/1ybmnmmzsZZTA0Y9awTDU... The Proposal to work with both WGSL, was also not accepted because it would "weaken the position of WGSL". "But think of the children/open web!" Apple knows how to push the right buttons on the Mozilla folks so that they tag along: Rust, wEB-StAnDARds, not invented here. - SPIRV was done by an evil technological group, not an open and inclusive standard body. We would tie our standard to whatever the SPRIV says, that's not open web. The open web can only flourish if everything is text based! cough WASM cough Rust ist such a modern language! - It's similar to what happened to WebSQL, except this time it's much worse as it also ruins any hope that WASM might be able to replace all the other technological cruft. Playing the old guessing game of how the transpiler will mangle your SPIRV is simply not something that people want to go back to.
- the_duke 5y ago