News for hackers. Stuff that matters.
Re:New Vulkan Documentation Website by no_time on Wednesday October 11, 2023 @11:14AM (#37845529)
>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

Re:New Vulkan Documentation Website by crthpl on Wednesday October 11, 2023 @11:49AM (#37846035)
dawn 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/

Re:New Vulkan Documentation Website by pjmlp on Wednesday October 11, 2023 @01:04PM (#37847131)
Actually 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.

Re:New Vulkan Documentation Website by flohofwoe on Wednesday October 11, 2023 @01:44PM (#37847749)
<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).
Re:New Vulkan Documentation Website by pjmlp on Wednesday October 11, 2023 @01:55PM (#37847892)
So 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++.

Re:New Vulkan Documentation Website by flohofwoe on Wednesday October 11, 2023 @01:50PM (#37847824)
There's standardized C API which is both implemented by Dawn and wgpu.rs:

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.

Re:New Vulkan Documentation Website by slimsag on Wednesday October 11, 2023 @02:41PM (#37848540)
It'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.