Live data from Hacker News

Chrome ships WebGPU

developer.chrome.com

201–210 of 405 posts

Re: Chrome ships WebGPU

#201

I remember when WebRTC was introduced, it was found that it became very popular and was used by almost every page. But closer inspection showed that its use was to get user's IP address for better fingerprinting. I predict that WebGL/WebGPU will be mainly used for the same purposes. Nobody needs new fancy features, what people really need is more reliable fingerprinting (this is proven by number of uses of WebRTC for…

People tend to forget that the good part about Flash was that it offered all this (there was an API for low-level high-performance 3D graphics, Stage3D), except there was also an explicit boundary between the "document" and the "app" and most browsers offered an option to only load Flash content when you click on its area. I'm thus still convinced that turning browsers themselves into this application platform kind of thing is a disaster. The industry is going very wrong and dangerous way right now.

It's never too late to delete all this code and pretend it never happened though. I want to see a parallel reality where Flash became an open standard, with open-source plugins and all that. It is an open standard and there is at least one project of an open source Flash player (Ruffle), but it's too late. I still hope Flash makes a comeback though.

Re: Chrome ships WebGPU

#203

Earlier quoted context omitted.

Just put WebGL/WebGPU behind permission and the problem is solved. I don't understand why highly paid Google and Firefox developers cannot understand such a simple idea.

Just put WebGL/WebGPU behind permission and the problem is solved. Just put WebUSB behind permission and the problem is solved. Just put WebHID behind permission and the problem is solved. Just put WebMIDI behind permission and the problem is solved. Just put Filesystem Access behind permission and the problem is solved. Just put Sensors behind permission and the problem is solved. Just put Location behind permission…

Yes please

Re: Chrome ships WebGPU

#204

This is very exciting! (I had suspected it would slip to 114) WebGPU implementations are still pretty immature, but certainly enough to get started with. I've been implementing a Rust + WebGPU ML runtime for the past few months and have enjoyed writing WGSL. I recently got a 250M parameter LLM running in the browser without much optimisation and it performs pretty well! ( https://twitter.com/fleetwood___/status/16384…

what would it take to python -> wasm -> webgpu for the entire existing webgpu ecosystem (all of the libraries around neural networks, torch, yada yada)

The Apache TVM machine learning compiler has a WASM and WebGPU backend, and can import from most DNN frameworks. Here's a project running Stable Diffusion with webgpu and TVM [1].

Questions exist around post-and-pre-processing code in folks' Python stacks, with e.g. NumPy and opencv. There's some NumPy to JS transpilers out there, but those aren't feature complete or fully integrated.

[1] https://github.com/mlc-ai/web-stable-diffusion

Re: Chrome ships WebGPU

#205
post #87

Chrome and Firefox have supported WebGL since 2011 and WebAssembly since 2017. What is the reason we don't have at early-2010s quality AAA game experiences running in the browser?

Lots of reasons. Here are a few in no particular order from someone who's shipped games on the web, on consoles, and on PC:

* Deploying large software (i.e. games with all their textures and sounds and models) to the browser is a pain in the ass. Your content will get dumped out of the cache, the user's connection may be spotty, and the browser tab might use up too much RAM and get killed. Console and PC game distribution has an install stage because you need one and that simply is not possible in the web model [1]

* Browsers provide bad latency and stability characteristics. They will drop frames frequently due to garbage collection or activity in other tabs. The amount of multiprocess communication, buffering, etc involved in running a webapp also adds input and rendering latency. This makes games just feel sluggish and janky. If your only option for releasing your game is the web, you'll pick the web, but if players could get a smoother experience on Steam or PlayStation instead, you'd be a fool not to release there. The worst scenario is mobile, where in some cases the input delay on touches is upwards of 100ms.

* Browsers have subpar support for user input, especially on phones. For native games users can pick up an input device of their choice and begin playing immediately (unless it's an ancient PC game that doesn't support hotplug - this is more common on Linux for reasons that aren't obvious to me). In the browser, gamepad input doesn't report until you press a button - moving the analog stick to move a menu cursor isn't good enough - which is a weird and jarring experience. Fullscreen is required for certain types of input as well, which means people who prefer to game in a window on their desktop are out of luck. Apple gets bonus points for just intentionally making all of this stuff worse on iOS to force you into the App Store for that sweet 30% cut.

* AAA game experiences are expensive and more importantly time-consuming to develop. There are studios that started building AAA web game experiences a long time ago, and over the course of years most or all of them flamed out. Game development is hard so these failures aren't exclusively the fault of the web platform, but the web platform certainly didn't help. See https://www.gamedeveloper.com/business/rts-studio-artillery-... for one example - they started out building an AAA web game, then pivoted to native because they couldn't get around all the problems with web games, and then eventually shut down.

* Browsers have limited access to resources. I gestured at this in the first bullet point, but if you run in a browser tab you have less address space, less compute throughput, less VRAM, and less bandwidth at your disposal than you would in a native game. For "AAA" experiences this is a big problem, but for simpler games this is not really an issue. For large scale titles this can be the difference between 30fps and 60fps, or "all the textures are blurry" and "it looks crisp".

[1]: There are some newer APIs that alleviate some of the issues I listed, but not all of them

Re: Chrome ships WebGPU

#206
post #123

Earlier quoted context omitted.

I'm not sure what you mean. All you need to do is this: function computation() { ... } before = performance.now(); computation(); t = performance.now() - before; (Obviously there will be noise, and you need to average a bunch of runs to get reliable results.)

In this case the runtime would not be able to guarantee that the timing has no externally observable side effects (at least if you do something with t). It would then run in the fixed execution speed mode.

Lots of code accesses the current time. So I think you'd end up just running 90% of realistic code in the fixed execution speed mode, which wouldn't be sufficiently performant.

Re: Chrome ships WebGPU

#207

Earlier quoted context omitted.

Google are the people paying for Chrome, they do not benefit in any way from this kind of fingerprinting. To the contrary, it decreases the value of their browser monopoly.

> Google are the people paying for Chrome, they do not benefit in any way from this kind of fingerprinting. The largest ad company in the world 80% of whose money comes from online advertising does not benefit from tracking...

Of course they do, but they want to allow fingerprinting in ways that only Google gets the data (i.e. spying on chrome users)

Re: Chrome ships WebGPU

#208

Earlier quoted context omitted.

I track population frequency of WebGPU extensions/limits here: https://web3dsurvey.com . The situation currently is much better when WebGL1/WebGL2 but there is still a lot of surface area.

Interesting. The data shows that WEBGL_debug_rendered_info [1] which allows sites to know the name of your graphic card, is supported almost in 100% of browsers. Seems that better fingerprinting support is really a priority among all browser vendors. [1] https://web3dsurvey.com/webgl/extensions/WEBGL_debug_rendere...

This is sadly a requirement for the time-honored game development tradition of "work around all the bugs in end user drivers", which also applied to WebGL while it was still immature.

At this point there's probably no excuse for continuing to expose that info though, since everyone* just uses ANGLE or intentionally offers a bad experience anyway.

Re: Chrome ships WebGPU

#209

I'm very curious about isolation. Nvidia doesn't allow virtual GPUs on their consumer card drivers so this isolation feels like it can easily be abused. Will there be more support for vGPUs in the future? I hope Nvidia and others are pushed to include better isolation and vGPU support so that WebGPU doesn't need to do all this security isolation themselves. Your browser could theoretically request a vGPU instance to…

In general it would be great if browser GPU processes could operate on a vGPU, so the web as a whole would be isolated from the rest of your system. Right now that's not the case, so you're relying on drivers for that browser vs apps isolation, and relying on the browser to isolate tabs from each other as well. Both have failed in the past.

Re: Chrome ships WebGPU

#210

If apple put it in safari - this is app store killer

Games in iOS safari are still at a big disadvantage even if they have access to WebGPU, because Apple intentionally undermines input and fullscreen APIs there to keep games in the app store.
Post reply on HN