Aardwolf 4 days ago

It says "Browser doesn't support WebGPU" in both Chrome and Firefox in Linux

What's the situation of WebGPU, is it supposed to work in Linux or not?

I'm sure that I've seen other GPU-like things (water simulations etc...) run in my browser before so I'm not sure what's wrong this time, or how many different GPU-like API's exist for browsers other than WebGPU (like WebGL).

I sometimes enable and/or disable "hardware acceleration" in Chrome and/or Firefox because sometimes one or sometimes the other causes video problems (sometimes having hardware acceleration on can make videos slower despite what you'd think). Is this hardware acceleration setting related to WebGPU?

2
jsheard 4 days ago

> What's the situation of WebGPU, is it supposed to work in Linux or not?

Chrome officially supports WebGPU on all platforms except Linux for now, you can force it on with a flag but it's obviously not meant for prime time yet. Firefox has yet to officially ship WebGPU at all but it's supposed to be coming in version 141, due at the end of July. Safari is still dragging its feet with no indication at all of when they'll get around to shipping.

Aardwolf 4 days ago

I see, I thought 3D graphics in browsers already existed and worked in Linux for a very long time so this must be a new one then... what's the difference between WebGPU, and WebGL that allowed demos like this one since long ago? https://madebyevan.com/webgl-water/

Is there some reason WebGPU has difficulties getting implemented for Linux, like DRM features or so?

sspiff 4 days ago

Different API, WebGPU is supposed to be a safe common denominator for Vulkan, DirectX 12 and Metal.

WebGL is that, but for OpenGL ES 2.0, and WebGL 2 is that but for OpenGL ES 3.0. WebGL is OK for graphics, but pretty hard to effectively adapt for compute / simulations.

jakkos 4 days ago

> what's the difference between WebGPU, and WebGL

WebGL has a bunch of limitations, but a big one is that you can only use the gpu to move around triangles vertices (vertex shader) and color them in (pixel shader).

If you want to do something like that cool water simulation you have to do some painful hackery to pretend all your data is actually vertices or colors in a texture. Even with hackery, there's still lots of things you simply can't do.

WebGPU supports compute shaders which let you read and write whatever data you want.

danjl 4 days ago

If I had to guess, the reason WebGPU is not implemented in Linux is because nobody is paid to add features to Linux. This means that new features are delayed by several years. WebGL is old, and well supported. WebGPU is newer, and has less support.

modeless 4 days ago

Google cares about Chrome Linux support and pays people to work on it, for two reasons. One is Chrome OS, and the other is that most Google engineers use Linux desktops for work.

brulard 4 days ago

Do they? I thought they would mostly be on MacBooks.

modeless 4 days ago

Most Google engineers have both. Or at least they did when I was there. And Chrome developers in particular do their development primarily on Linux.

flohofwoe 3 days ago

Most likely minor behaviour differences or bugs in specific Linux Vulkan drivers or driver versions and the Chrome WebGPU team first wanting to get other platforms in shape. Chrome for Android has WebGPU enabled and that also runs on top of Vulkan, but I guess Google has more control over driver quality in the Android ecosystem than on Linux.

erwincoumans 4 days ago

that's a pretty WebGL fluid demo, it runs even well on iPhone.

modeless 4 days ago

Huh, disappointing that it hasn't shipped in Chrome on Linux. There's no pressure for other browsers to implement it when it's not even on all of Chrome's supported platforms yet.

AStonesThrow 4 days ago

Are you using Chrome, or Chromium?

Chromium is typically the bundled browser, but around 2019 Google restricted certain aspects of Chromium under Linux, and in order to continue using things like browser login under Ubuntu, I needed to install Chrome instead.

Hardware acceleration perks seem like another feature that may have a Chrome/Chromium divide.