gpu.js icon indicating copy to clipboard operation
gpu.js copied to clipboard

Chrome 113 with WebGPU breaks GPU.js

Open dimagoltsman opened this issue 2 years ago • 12 comments

A GIF or MEME to give some spice of the internet

What is wrong?

Chrome 113 breaks GPU.js when not scoped, its already has GPU object

Where does it happen?

when u try to use new GPU

How do we replicate the issue?

try using GPU.js

How important is this (1-5)?

5

Expected behavior (i.e. solution)

to work

Other Comments

dimagoltsman avatar May 02 '23 05:05 dimagoltsman

Same. is there a quick fix / hack?

lampmaker avatar May 12 '23 12:05 lampmaker

Nevermind; renamed all "GPU" instances in gpu-browser.min to "GPUX" That worked for now.

lampmaker avatar May 12 '23 12:05 lampmaker

Nevermind; renamed all "GPU" instances in gpu-browser.min to "GPUX" That worked for now.

Me to, but thats a very bad practice.... thats a temp solution not a permanent one

dimagoltsman avatar May 12 '23 12:05 dimagoltsman

Oh, yes, bad practice indeed. "Dont try this at home" Consider it a workaround until a better solution is implemented.

lampmaker avatar May 12 '23 13:05 lampmaker

@robertleeplummerjr can you fix this? all the cool gpu.js projects suddenly stopped working :p

suspicious-pineapple avatar Jun 16 '23 20:06 suspicious-pineapple

Yea I'll have to address it soon. Perhaps next week.

robertleeplummerjr avatar Jun 16 '23 20:06 robertleeplummerjr

maybe gpu.js can leverage WebGPU? if it has any advantages performance-wise, and if the effort required doesn't mean rewriting all of gpu.js

would be especially interesting to see if it allows more flexibility with data types passed to/returned by gpu.js

suspicious-pineapple avatar Jun 22 '23 11:06 suspicious-pineapple

yeah that will be awesome!

dimagoltsman avatar Jun 22 '23 11:06 dimagoltsman

We'd love to do that, but the existing API isn't mature enough across browsers, at least from what I've seen with compute capabilities. I've never had a stock example actually run and have a means of starting to upgrade GPU.js to that.

As far as the issue with GPU being overwritten (rude with prejudice) what do you guys think of using GPUJS for browser only, and GPU everywhere else (node, typescript, etc.)?

robertleeplummerjr avatar Jun 22 '23 14:06 robertleeplummerjr

sounds good enough

suspicious-pineapple avatar Jun 22 '23 16:06 suspicious-pineapple

We'd love to do that, but the existing API isn't mature enough across browsers, The api is very VERY mature, but only a few browsers support it https://caniuse.com/?search=webgpu

jacobbogers avatar Dec 18 '23 18:12 jacobbogers

As I have looked at gpu.js code vs current webgpu surface, it will be largely obsoleted, as gpu.js has to deal with how webgl handles concurrency, there is no such problem in webgpu, so I think its better to totally start from scratch (keep the brand name if you must, but from scratch you must start)

jacobbogers avatar Dec 18 '23 18:12 jacobbogers