Live data from Hacker News

WebGPU is now available on Android

developer.chrome.com

21–30 of 75 posts

Re: WebGPU is now available on Android

#21

What’s the actual utility of this for anyone that isn’t trying to replace native code with web pages? Is this ever going to be worth the no doubt massive investment it required?

"trying to replace native code with web pages? " No one wants that. But many like to write their apps only for one plattform - and then still have them run allmost everywhere. The web is the best we have to achieve this. And this will greatly improve the possibilities. Edit: My app will soon finally use no more html elements. It is not a "webpage".

> No one wants that.

I very much do want that since the WebGPU API is far easier and nicer to use than Vulkan or OpenGL. Also, it makes apps much more accessible to distribute them over web, and it is much more secure to use web apps than native apps. Unfortunately WebGPU is way too limited compared to desktop APIs.

Re: WebGPU is now available on Android

#23

> Timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute compute and render passes > ... > Due to timing attack concerns, timestamp queries are quantized with a resolution of 100 microseconds, which provides a good compromise between precision and security. I don't have a particular need of nanosecond granularity timestamps for WebGPU…

The former is a spec detail (the result is returned in ns) and the latter is an implementation detail (browsers currently quantize the result to 100us). That is a useful distinction since you can use WebGPU outside of the browser by embedding Dawn or wgpu into your own application, and there you should get the maximum resolution the spec allows for. Environments like Electron might also opt-out of that timing attack mitigation since they're intended to run trusted code.

I agree the article could have made that clearer though.

Re: WebGPU is now available on Android

#24

Earlier quoted context omitted.

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.

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.

Re: WebGPU is now available on Android

#25
post #5

Nice! We just need Linux and iOS. And then we'll have somewhere around 80% support for WebGPU across all devices. I'm getting my numbers https://web3dsurvey.com/webgpu Android: 0.34% Chromium OS: 78.15% iOS: 0.09% Linux: 0.75% Mac OS: 54.43% Windows: 77.96%

if safari tech preview is anything to go by, it may come to iOS sooner or later

https://webkit.org/blog/14879/webgpu-now-available-for-testi...

Re: WebGPU is now available on Android

#26

What’s the actual utility of this for anyone that isn’t trying to replace native code with web pages? Is this ever going to be worth the no doubt massive investment it required?

It's likely to become the best way to run cross-GPU-platform gpu code in the medium term

Re: WebGPU is now available on Android

#27

Earlier quoted context omitted.

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.

Re: WebGPU is now available on Android

#28

Earlier quoted context omitted.

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 an…

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.

Re: WebGPU is now available on Android

#29

What’s the actual utility of this for anyone that isn’t trying to replace native code with web pages? Is this ever going to be worth the no doubt massive investment it required?

I feel like WebGPU actually holds some amount of promise as a cross-platform convenience. I'd agree that there's not a great reason to update your native code for this right now though.

If you're writing new gfx code though and are more familiar with web technology, there's definitely utility there. That's the bigger value prop: that people with web development skills can work on more pro (GPU-required) applications.

Post reply on HN