3 ms·
WGSL is defined as a "bijection" to a "subset" of spir-v -- they could have simply specced that subset.
by mwkaufma 2y ago
WGSL 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.