#WebGPU is an incredibly important API. Not just for browsers, but for GPUs in general.

It forces vendors to converge on common approaches that work across platforms and GPUs, instead of everyone pulling towards their own proprietary APIs and extensions.

It's a unique spec where Apple and Android cooperate. The designs are validated by being implemented by multiple browser vendors, reliably enough to be compatible with sandboxing, across all platforms from Windows to Linux.

@kornel if only they would have come with a proper binary IR for shaders, it would have been vastly more appealing. Even using SPIR-V as a binary basis and use extensions to cover/simplify specific bits and translating it to a basic SPIR-V would be so much better. That's the biggest sin of webgpu 1.0 imo

@xoofx That's not so strange for the Web platform that didn't have bytecode before WASM, and even tried to have asmjs instead.

AFAIK you wouldn't get any extra functionality from a binary IR. Compression eliminates size difference between IR and source code, and syntax parsing isn't very expensive, especially that there's going to be a cost of validation and back-end compilation anyway.

@kornel @xoofx Text is not the issue, but vendor-specific parsers are. GLSL is a prime example, it has to be parsed by the driver. In the demoscene, since most people have nVidia hw, hardly any OpenGL demos work on AMD lately. I'm afraid we'll see the same issue with Tint (Chrome) and Naga (Firefox).
@aedm That's what standards are for. HTML, CSS, and JS are more complex to parse and got interop. OTOH if a vendor wants to add extensions, they can add them to SPIR-V too. You will also get vendor-specific code at semantic level, like assumptions about warp sizes and various limits.
@kornel HTML, CSS and JS are prime exhibits of browser-specific behavior, we've been through years of pain. Compatibility issues even contributed to the death of IE. Maybe it's just me but historically, binary formats seem to be less error prone. WGSL as a language is pretty neat though.

@aedm There's a significant difference in post-WHATWG world. We've got HTML5 parsing interoperable, despite it being Dark Souls of syntaxes.

Parsing is just one, relatively easy, step. GPU interoperability has bigger problems with things like overhead of buffer access verification, pointer support, native texture formats, optimal workgroup sizes, and it's going to need extensions for ray tracing, upscaling, etc. Binary format doesn't solve the hard problems.