Rendering WebGPU with offscreen canvas seems to have no effect
Categories
(Core :: Graphics: WebGPU, defect, P2)
Tracking
()
People
(Reporter: tenghong.yap, Unassigned)
References
(Depends on 2 open bugs, Blocks 1 open bug)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Steps to reproduce:
I have a small WebAssembly App which perform the WebGPU render call in the worker thread using a offscreen canvas.
The rendered offscreen canvas is then transferred over to a '2D' context offscreen canvas for Image data extraction.
The extracted Image data is then post over to main thread for display.
Actual results:
Image is not shown on the main thread canvas.
The Image data extracted from the '2D' context offscreen canvas shows no data within the result array.
Expected results:
Image should shown on the main thread canvas
The Image data extracted should contain data.
Similar code behavior is implemented on "webgpu in a worker" sample.
The sample also shows nothing is rendered
https://webgpu.github.io/webgpu-samples/samples/worker
Tested on Firefox Browser Nightly
125.0a1 (2024-02-29) (64-bit)
Comment 1•7 months ago
|
||
This is a dupe of bug 1818042, so I'll close in favor of that. However, I'm sure that the repro steps will be appreciated there, still; dupes usually get checked for functionality like this. Having a concrete way to test whether we're actually unblocking user code is great!
Thanks for taking the time to file this. 🙂
Comment 2•7 months ago
|
||
Ah, and in the meantime: does setting dom.webgpu.workers.enabled
in about:config
unblock this?
Reporter | ||
Comment 3•7 months ago
|
||
Enabling dom.webgpu.workers.enabled, allows the worker to access the webgpu adaptor via navigator.gpu. However it's does not provide any gpu information and nothing seems to be rendered onto the offscreen canvas from the worker thread.
Comment 4•6 months ago
|
||
Reopening this since there's a report of something not working correctly with the worker pref flipped. Andrew, when you have a chance can you take a look?
Comment 5•6 months ago
|
||
tenghong.yap, are you able to run the same workload correctly outside of a worker context? I'm trying to figure out if maybe this is a bug that will happen between OffscreenCanvas
and WebGPU anywhere, or only in worker contexts.
Reporter | ||
Comment 6•6 months ago
|
||
Erich, It seems the bug happens on OffscreenCanvas instead.
I did some modification to allow the render to be done on the main html (instead of spawning a worker to render), the image data retrieve from the 2D Context remains empty
Comment 7•6 months ago
|
||
In that case, I see no reason to involve Andrew (yet), since this issue does not seem specific to workers.
Updated•6 months ago
|
Reporter | ||
Comment 8•6 months ago
|
||
Is there any updates with regards, to this issue?
Comment 9•6 months ago
•
|
||
tenghong.yap: I suspect we will need to fix bug 1885402, which is regression introduced by changes for bug 1883810.
Actually, I'm curious: Can you reproduce this issue in a build prior to the fix for bug 1883810 (viz., using date 2024-03-12 or earlier with mozregression
, i.e,, mozregression --launch 2024-03-12
)?
Reporter | ||
Comment 10•6 months ago
|
||
As per request, I did a regression check on from 2024-03-12 to 2023-12-20. None of the versions worked.
Do note that the version used when the issue was first reported was 125.0a1 (2024-02-29) (64-bit)
Hence I am not too sure if the bugfix you mention was the one to introduce the regression.
Reporter | ||
Comment 11•6 months ago
|
||
I have also attach the build which only run offscreen canvas on the main html.
Hope this help if your testing to figure out what have cause the issue.
You can do a simple "python3 -m http.server" to host the app, for the testing
Updated•6 months ago
|
Reporter | ||
Comment 12•4 months ago
|
||
Hi, Is there any update or estimation when this would be schedule to be fix?
Comment 13•4 months ago
|
||
tenghong.yap: Unfortunately, no. The WebGPU team still has quite a few P1s and other higher priority tasks to deal with before we get to the OffscreenCanvas
API. Updates will happen here as work begins on it.
Reporter | ||
Comment 14•4 months ago
|
||
Erich Gubler: Noted Thanks for the update! Can't wait to see OffscreenCanvas work with WebGPU on Firefox soon
Description
•