3 ms·
They could not "just" have used SPIR-V bytecode. WebGL already had to do a bunch of work to restrict GLSL's semantics to work in the web sandbox; whatever WebGP
by Rusky 2y ago
They could not "just" have used SPIR-V bytecode. WebGL already had to do a bunch of work to restrict GLSL's semantics to work in the web sandbox; whatever WebGPU chose would have had the same problem.
- mwkaufma 2y agoWGSL is defined as a "bijection" to a "subset" of spir-v -- they could have simply specced that subset.
- MindSpunk 2y agoI do not believe this is true anymore and WGSL is a "real language" now that actually requires a "real language frontend" to compile. The original spec didn't even have while loops, they expected you to effectively write the SSA graph by hand (because SPIR-V is an SSA IR). Then the design drifted as they kept adding pieces until they accidentally made an actual language again.
- pjmlp 2y agoThat was the original plan, then they created their Rust inspired language instead.
- mwkaufma 2y agoYeah exactly, that's why refusing to simply spec the bytecode at the time was exactly the sabotage that everyone called it out as.
- modeless 2y agoIn comparison to inventing a new language and three independent interoperable implementations from scratch, I think "just" is appropriate.