9 ms·
>WebGPU A massive shame that it's more or less bolted to the Sodom and Gomorrah of modern software development (Browsers and JS). Atleast in mindshare for sure
by no_time 3y ago
>WebGPU
A massive shame that it's more or less bolted to the Sodom and Gomorrah of modern software development (Browsers and JS). Atleast in mindshare for sure.
There appears to be a non browser implementation of WebGPU now looking into it, but I can't find anyone using it or attempting to use it in production
https://dawn.googlesource.com/dawn https://dawn.googlesource.com/dawn
- crthpl 3y agodawn is the WebGPU backend in chromium, while wgpu is the WebGPU backend for firefox written in Rust. wgpu is seeing a lot of use in non-browser uses; there are some examples on their website. https://wgpu.rs/ https://wgpu.rs/
- pjmlp 3y agoActually there is something great related to that. Despite my usual rants on how they are outdated in regards to native APIs, there is a great plus for them, WebGL and WebGPU are the only 3D APIs designed from scratch for managed languages.
- flohofwoe 3y ago<webgpu/webgpu.h> is actually a very decent C API (it does have explicit lifetime control via 'reference' and 'release' calls like COM though, but that's okay-ish - same rules as D3D basically).
- pjmlp 3y agoSo far I have only bothered with the actual browser version in Chrome. It goes beyond it, because CPU-GPU interfaces were also designed with JavaScript GC in mind. Hence why on Android they are finally thinking about using WebPGU to expose Vulkan to app developers, as most keep using GL ES instead of downgrading their developer experience dealing with NDK, C and C++.
- flohofwoe 3y agoThere's standardized C API which is both implemented by Dawn and wgpu.rs: https://github.com/webgpu-native/webgpu-headers/blob/main/webgpu.h https://github.com/webgpu-native/webgpu-headers/blob/main/we... ...and this standardized API would also enable other independent native implementations (and shader compilation aside, it's actually not in the realm of the impossible to write a WebGPU implementation from scratch with a small team or even alone). There's even thought put into the API being extensible via 'struct chaining', this is how the native implementations also accept SPIRV shader bytecode instead of just WGSL shader source code.
- slimsag 3y agoIt's worth noting that both Dawn and wgpu (the two primary WebGPU implementations currently) disagree on key parts of that API - particularly around instance creation, and so they are not ABI compatible today. If you're building an application, you'd better make sure you are using _the implementation's version_ of the webgpu.h header today. Hopefully one day it does become fully standard.