Chromium switching shader translators for WebGPU

Hey all,

We just switched Chromium to use Tint instead of SPIRV-Cross for shader
translation of both SPIRV/WGSL to HLSL/MSL/SPIR-V and it will roll out to
Canary in a couple days. It is an important step towards productionizing
the final WebGPU stack of Chromium. However this is a very large change, so
you might see regressions. If you find any please file an issue on
https://crbug.com/tint so we can make sure your content works during the
upcoming WebGPU Origin Trial (think open beta for APIs in Chromium). You
can search for *use_tint_generator* in about:gpu to see if you're using the
new path.

Note that Chromium will stop supporting creating GPUShaderModule with
SPIR-V soon, for Origin Trial (--enable-unsafe-webgpu will still make
SPIR-V work). Tint should be a working SPIR-V to WGSL translator and will
be ported to WebAssembly in the future. To try Tint's translation, you can
use the Chromium command line flag
*--enable-dawn-features=use_tint_generator,force_wgsl_step*. It will make
Chromium do SPIR-V to WGSL translation before any further processing of
shaders, the same way you would do in a Web page.

If regressions become blocking, you can use the Chromium command line flag
*--disable-dawn-features=use_tint_generator* to temporarily keep using the
SPIRV-Cross path.

Cheers,

Corentin

Received on Thursday, 8 July 2021 19:37:12 UTC