2 ms·
Many Web applications will just ship WGSL. This includes everything going through Three.js, Babylon.js, and hand-written web apps. It's not even clear if Chrom
by kvark 7y ago
Many Web applications will just ship WGSL. This includes everything going through Three.js, Babylon.js, and hand-written web apps.
It's not even clear if Chrome or Firefox will accept SPIR-V binary as an extension at this point.
Anyway, conversion to and from SPIR-V is supposed to be straightforward and light. Our (speaking for gfx-rs community) Rust-based shader infrastructure will handle that , and the converter should be easily compilable to wasm (when it's ready).
Anyway x2, most of the time in the whole picture of creating pipelines will be spent in the driver, so whatever parsing performance difference WGSL brings to the table, be it 5% or 10%, doesn't matter, you aren't going to see that in benchmarks because of that other stuff that's going on when you are creating a pipeline.
- shmerl 7y agoIt would still be good for Firefox and Chrome to accept SPIR-V bytecode (in addition to WGSL). This way you can write some client side library, that converts SPIR-V on the fly to WGSL for crippled browsers (Apple) and use SPIR-V directly for everyone else. I hope Mozilla and Google won't cave that way to this Apple's idiotic behavior.