RESOLVED FIXED 266825
WebGL is available in webworker but not available in sub webworker
https://bugs.webkit.org/show_bug.cgi?id=266825
Summary WebGL is available in webworker but not available in sub webworker
Tom
Reported 2023-12-22 15:05:11 PST
Created attachment 469180 [details] The first line is logged on a webworker directly, the second line is logged in same webworker by receiving postMessage from its sub worker indicate whether WebGL is supported WebGL is available in webworker but not available in sub webworker
Attachments
The first line is logged on a webworker directly, the second line is logged in same webworker by receiving postMessage from its sub worker indicate whether WebGL is supported (188.39 KB, image/png)
2023-12-22 15:05 PST, Tom
no flags
testcase (777 bytes, application/zip)
2024-01-04 04:10 PST, Kimmo Kinnunen
no flags
testcase (991 bytes, application/zip)
2024-01-04 04:27 PST, Kimmo Kinnunen
no flags
Karl Dubost
Comment 1 2023-12-24 21:17:21 PST
Hi Tom, Thanks for the report. Are sure you it doesn't work. Or are you reporting that you can't see its result in the Console? Because this could be a duplicate of Bug 255402
Karl Dubost
Comment 2 2023-12-24 21:18:07 PST
It would be great if you could provide a reduce test case.
Tom
Comment 3 2023-12-26 10:27:35 PST
(In reply to Karl Dubost from comment #1) > Hi Tom, > Thanks for the report. > > Are sure you it doesn't work. > Or are you reporting that you can't see its result in the Console? > > Because this could be a duplicate of Bug 255402 Hi Karl Yes, base on my testing, WebGL is not available in sub-worker, I notice the console issue for sub-worker as well, but the unavailability of WebGL in sub-worker is the bug I reported in this ticket
Tom
Comment 4 2023-12-26 10:36:52 PST
(In reply to Karl Dubost from comment #2) > It would be great if you could provide a reduce test case. Hi Karl The test code could be like this, just start a new webworker with "worker.js" in a HTML page, it will output "is sub-worker support WebGL: false" on Safari 17 worker.js const worker = new Worker("./subworker.js"); worker.addEventListener("message", (e) => { console.log("is sub-worker support WebGL: ", e.data); }) subworker.js const ofs = new OffscreenCanvas(1, 1); self.postMessage(ofs.getContext('webgl') ? true : false);
Radar WebKit Bug Importer
Comment 5 2023-12-29 15:06:12 PST
Kimmo Kinnunen
Comment 6 2024-01-04 04:10:46 PST
Created attachment 469288 [details] testcase
Kimmo Kinnunen
Comment 7 2024-01-04 04:27:02 PST
Created attachment 469289 [details] testcase
Kimmo Kinnunen
Comment 8 2024-01-05 04:57:33 PST
Tom
Comment 9 2024-01-05 09:20:38 PST
(In reply to Kimmo Kinnunen from comment #8) > Pull request: https://github.com/WebKit/WebKit/pull/22431 Hi Kimmo Happy new year and thank you for fixing it so quickly, do you know when will this fix released on Safari?
EWS
Comment 10 2024-01-08 08:07:12 PST
Committed 272765@main (9fb944e082ca): <https://commits.webkit.org/272765@main> Reviewed commits have been landed. Closing PR #22431 and removing active labels.
Tom
Comment 11 2024-01-26 14:16:02 PST
I tested on Safari Technology Preview 187 which said this issue has been fixed in release note, but it's still not working
Kimmo Kinnunen
Comment 12 2024-01-29 08:01:26 PST
Thanks for verifying. Which macOS version are you using? WebGL on workers should work only on macOS 14 Sonoma.
Kimmo Kinnunen
Comment 13 2024-01-29 08:06:23 PST
Never mind, I see it not working on STP 187 on macOS 14
Kimmo Kinnunen
Comment 14 2024-02-08 02:44:26 PST
This should be now fixed and testable in Safari Technology Preview 188 for Sonoma.
Kimmo Kinnunen
Comment 15 2024-02-08 02:44:32 PST
Tom
Comment 16 2024-02-09 09:57:20 PST
(In reply to Kimmo Kinnunen from comment #14) > This should be now fixed and testable in Safari Technology Preview 188 for > Sonoma. I tested in 188, it's working, thank you
Note You need to log in before you can comment on or make changes to this bug.