WebGL issues in headless mode on ARM Mac since 111

1,461 views
Skip to first unread message

Anton Dosov

unread,
Mar 23, 2023, 2:11:41 PM3/23/23
to Chromium-dev, Tim Sullivan, Rachel Shen
Hello, dear Chromium devs 👋

We’re upgrading our headless environment to revision 1095492 (version 111.0.5555.0) and we noticed that WebGL doesn’t seem to be working in headless mode on ARM Mac anymore. We wonder if there is a launch flag we're missing or if we should file a bug or something else.

For example, we try:

chromium/chrome-mac/Chromium.app/Contents/MacOS/Chromium --headless --disable-gpu --screenshot --window-size=1280,1696 https://get.webgl.org/

Which results in 

screenshot.png

objc[58489]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x242c85518) /chromium/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/111.0.5555.0/Libraries/libGLESv2.dylib (0x106a1fdb0). One of the two will be used. Which one is undefined.

[0321/120806.319954:ERROR:gles2_command_buffer_stub.cc(344)] ContextResult::kFatalFailure: Failed to create context.

[0321/120806.320850:ERROR:gles2_command_buffer_stub.cc(344)] ContextResult::kFatalFailure: Failed to create context.

94887 bytes written to file screenshot.png


We also get the same result in the newer versions.
I checked that the same command worked fine in 1083080 (version 110.0.5478.0).
Note that this appears to be an issue with headless mode. In headful mode, WebGL seems to be working fine.

We also checked the same command on Intel-based Mac, Windows, and Linux and the command works fine in these environments. This appears only to have issues for ARM-based Mac.

We wonder if there is a launch flag we're missing or if we should file a bug or something else.
 

Andrey Kosyakov

unread,
Mar 23, 2023, 3:03:29 PM3/23/23
to anton...@elastic.co, Chromium-dev, Tim Sullivan, Rachel Shen, Geoff Lang
Hi Anton,

This is a known issue -- headless uses swiftshader by default and swiftshader's support for WebGL is currently disabled on Arm pending the resolution of https://issuetracker.google.com/issues/165000222. As a workaround, you can force hardware GL drivers on mac. The best way to do this starting with m112 is by passing --enable-gpu, m111 and older versions should work with --use-angle.

Best regards,
Andrey.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/281e3f67-24a4-49aa-a7da-0743a142a437n%40chromium.org.

Anton Dosov

unread,
Mar 24, 2023, 3:21:06 PM3/24/23
to Andrey Kosyakov, Chromium-dev, Tim Sullivan, Rachel Shen, Geoff Lang
Hi Andrey,
Thank you, this is very helpful
--
Regards,
Anton
Software Engineer, 
Kibana Application Services
Reply all
Reply to author
Forward
0 new messages