6 ms·
I don’t think it’s a matter of trends, we have to look at the particulars of each API. OpenGL/WebGL aren’t well enough aligned with modern hardware to serve as
by codeflo 5y ago
I don’t think it’s a matter of trends, we have to look at the particulars of each API.
OpenGL/WebGL aren’t well enough aligned with modern hardware to serve as a cross-platform graphics layer.
That’s where the newer APIs come in. Vulkan, Metal and DirectX 12 all follow similar principles that would work from a technical standpoint, but we live in an age where platform vendors would rather cripple their platform than make it easy to port software. Apple is the worst offender here, because while Microsoft isn’t happy about it and disables it in “metro” apps, at least they don’t prevent GPU vendors from shipping Vulkan support for normal “desktop” apps.
But I’m optimistic about WebGPU: It’s designed to be efficiently implemented on top of the vendor APIs, so platform vendors can’t block it. And it’s low-level enough that it should allow implementing modern games on top of it.
(To clarify: I’m optimistic about WebGPU as an API for desktop applications. For browser apps, it seems like all vendors are on board already.)
- 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.
- BlueTemplar 5y agoMicrosoft is definitely the core issue here : they are trying to unify XBOX and PC gaming, and are NOT supporting Vulkan on XBOX.
- astlouis44 5y agoWebGL 2.0 today runs on not just desktop browser but also through the web on Xbox, which has a Chromium-based Edge which can run browser games and will get turbocharged with near native performance with the arrival of WebGPU. So you now have a platform target with one codebase that developers can target PC/Mac/Linux, mobile/tablet, and one of the biggest console platforms. I'd say that's pretty powerful.
- pjmlp 5y agoWe have always been in such an age, including console vendors. Apple support for OpenGL is a side effect of NeXT's acquisition, had Copland's efforts succeeded, they would have kept using QuickDraw 3D.