Hacker News new | ask | show | jobs
by mschuetz 883 days ago
I'm really looking forward to 2034, when WebGPU features will catch up to 2024.
4 comments

By that time, it might even get supported by Chrome for Linux.
Why is linux supporting taking a while? I figured the underlying graphics subsystem on Android is Vulcan right? Wouldn't that also be the main graphics subsystem on Linux these days?
Testing/Validation and bugfixing. Just having Vulkan isn't enough to enable it by default, everything actually has to work right. Even for Android this is only for specific types of devices. You should be able to force enable it on Linux right now though. It's just not GA quality guaranteed.
I tried and tried and tried, Chrome 120 will always stick an undocumented Origin Trial for disabling WebGPU.
You know we’ll have all moved onto Romulan by then, leaving Vulkan and Metal behind - including WebGPU.

In seriousness though, WebGPU in Chrome with “non-free” Linux GPU drivers should work, no?

Edit: I see it’s still behind a flag

about:flags in Chromium

search for "accel"

Disable the blacklist for your GPU.

Which is exactly why WebGL never really took off for games like Flash did, versus native games, or now streaming.

Having drivers installed is not enough as the browser lords decided the computer isn't worthy of playing games.

Flash was a buggy crap which made lots of older computers spawn cycles like crazy and had zero accesibility for the blind. It deserverd to die.
Usually the only ones complaining are Linux users.

The rest enjoyed the games, to the point that Flash is being brought back thanks WebAssembly, with Unity and Flutter as spiritual sucessors.

Doesn't stop disablement done through --origin-trial-disable-feature=WebGPU and I have yet to figure how to drop that without recompiling Chrome.
Afaik it is possible only in unstable and beta, not in stable. That's why GP mentioned Chromium, not Chrome.

Which fully supports pjmlp's point in the sibling comment.

On ChromeOS.
On devices by selected vendors, and only on selected models.
What features?
Personally, the ones I'm most looking forward to:

* Subgroup operations

* Push constants (available in wgpu, but not WebGPU the spec/web impl)

* u64 + atomic image ops

* Mesh shaders

* Raytracing

* Binding arrays / descriptor indexing + device buffer addresses

Similar. I've done experiments with subgroups suggesting approximately a 2.5x speedup for sorting (using the WLMS technique of Onesweep). Binding arrays will be very helpful for rendering images in the compute shader. A caveat is that descriptor indexing is not supported on mid-old phones like Pixel 4, but it is on Pixel 6. I somewhat doubt device buffer address will be supported, as I think the security aspect is complicated (it resembles a raw pointer), but it's possible they'll figure out how to do it.
Looking back to 10 years long WebGL adoption, and WebGPU being based on 2015 features, that is pretty much spot on.
In 2034 it'll be as dead as Flash because of security issues.
Not really, that is not the problem of WebGPU. The worst you can do is crash the tab. With an unstable graphics driver, there might even be the option to crash the system but that's hardly a security issue, only an annoyance.
Historically any time an attack surface as big as WebGPU has been exposed, "the worst you can do is crash the tab" has not ever been true.

Also note that for an unstable graphics driver, the way you usually crash the system is by touching memory you shouldn't (through the rendering API), which is definitely something that could be exploited by an attacker. It could also corrupt pages that later get flushed to disk and destroy data instead of just annoy you.

Though I am skeptical as to whether it would happen, security researchers have previously come up with some truly incredible browser exploit chains in the past, so I'm not writing it off.

WebGL has been around for more than a decade and didn't turn out to be a security issue, other than occasionally crashing tabs. Neither will WebGPU be.
By exposing vulnerable graphics drivers to arbitrary web code, WebGL has allowed websites to take screenshots of your desktop (https://www.mozilla.org/en-US/security/advisories/mfsa2013-8...) and break out of virtual machines (https://blog.talosintelligence.com/nvidia-graphics-driver-vu...), to use two examples I found via a web search.
Very curious what you see as the problems with WebGPU currently. I’ve been tinkering with it slowly as it has a bit of a learning curve.