gpujs / gpu.js

GPU Accelerated JavaScript
https://gpu.rocks
MIT License
15.1k stars 652 forks source link

GPU modes in Firefox not supported when running in workers. #677

Open qmalvido opened 3 years ago

qmalvido commented 3 years ago

A GIF or MEME to give some spice of the internet

What is wrong?

When trying to instance gpujs within a javascript worker using Firefox we get the error: "Error: A requested mode of "gpu" and is not supported" It happens with all modes except for "cpu". If the mode is not specified it seems to fall back to "cpu".

Where does it happen?

It happens at the time of instancing the object inside the worker.

How do we replicate the issue?

Please, see attached code: "issue.html" tries to create a worker using "issue-worker.js" issues.zip

How important is this (1-5)?

5

Expected behavior (i.e. solution)

It should create an instance in the specified mode matching the behavior in the main thread in Firefox.

Other Comments

The issue does NOT occur in Chrome. The issue does occur in Safari.