Hacker News new | past | comments | ask | show | jobs | submit login

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.



In comparison to inventing a new language and three independent interoperable implementations from scratch, I think "just" is appropriate.


WGSL is defined as a "bijection" to a "subset" of spir-v -- they could have simply specced that subset.


I 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.


That was the original plan, then they created their Rust inspired language instead.


Yeah exactly, that's why refusing to simply spec the bytecode at the time was exactly the sabotage that everyone called it out as.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: