Repository navigation
Fix globe render test baseline generation under macOS - #12090
Conversation
Does this mean that we can close #11419? Or is this still an issue in other contexts? |
| "browser_args": { | ||
| "Chrome": { | ||
| "ci": [ "--disable-backgrounding-occluded-windows", "--ignore-gpu-blocklist", "--use-gl=desktop" ] | ||
| "ci": [ "--disable-backgrounding-occluded-windows", "--ignore-gpu-blocklist", "--use-angle=gl"] |
There was a problem hiding this comment.
Looking at Chromium specs, there seem to be a few different variants possible, refer here. I note: vulkan, swiftshader (only for debugging), gles, metal. There's more documentation about it here.
I imagine two areas of investigation useful for potential improvements and increased coverage:
- On Mac, if it happens that chrome on end user machines mostly default to
--use-angle=metal, we could default to that on development machine and differentiate when developers (us) run the render test vs when circle CI runs the render test, so that we'd at least have coverage of bothglandmetal. You can check what is currently in use here by going tochrome://gpu/. That might be something we can address now. - It might be worth researching whether we should cover different Angle backend variants that are used by end-user machine, e.g. running different CI builds with each of these variants, similar to the
render-test-cspandrender-test-prodthat we have here. This might be something to address separately.
We could document some of these findings on https://github.com/mapbox/gl-js-team/issues/480 or any other issue.
(cc @ansis as using this flag could be a way to detect potential misbehavior between Angle backends)
There was a problem hiding this comment.
Hi @karimnaaji! In order to allow covering different ANGLE backends, an option to allow setting the --use-angle chrome flag locally when running render tests locally has been enabled. By default, running the render tests locally will not set any chrome flags. I did not add any CI builds to run different configurations, but it could be something added in the future if it feels helpful.
I don't think Macs default to metal for the render tests for the most part, so my assumption is possibly incorrect on metal causing render test differences. I ran chrome://gpu/ on my computer (intel Mac) and Metal is shown as "disabled". I also had @stepankuzmin (with M1 mac) check chrome://gpu/ and metal appears as disabled as well. However, @stepankuzmin seemed to have less failures with forcing ANGLE to use OpenGL with using the chrome flag --use-angle=gl, so I'm not entirely sure of the cause there but allowing to pass the use-angle flag options locally could be helpful and to also test out different graphics backends as well.
It's not an issue related to the failing render tests but is still an issue specifically with satellite styles and all projections. I shared a screen recording of map.loaded() returning true before all rendering has completed with mercator in the other issue. |
SnailBones
left a comment
There was a problem hiding this comment.
I can confirm that this branch fixes docs image generation on my Intel chip Mac! 🎉
karimnaaji
left a comment
There was a problem hiding this comment.
LGTM, also +1 on addressing this comment before merging: https://github.com/mapbox/mapbox-gl-js/pull/12090/files#r932461950

Fixes gl-js team issue #462.
Previously we forced our render tests to disable angle with the chrome flag
--use-gl=desktopintroduced by #10389. The result of disabling angle while running render tests locally has caused globe render tests to fail on MacOS.The new implementation continues running tests on circleCI as it was previously, but separates setting the chrome flags for circleCI from local
yarn test-renderruns. If you want to run how it is in circleCI (i.e. with the--use-gl=desktopflag) you can set CI=true in the CLI as soCI=true yarn test-render. Not forcing the local environment to disable ANGLE with--use-gl=desktopwill allow more render testing across different environments.This change also allows an option to change the ANGLE graphics backend locally. Some devices (e.g. M1 macs) seem to run the render tests with significantly less failures when forcing the ANGLE backend to be set to OpenGL. To configure the ANGLE backend, you can set the
--use-angleinput value toUSE_ANGLEin CLI like so:USE_ANGLE=gl yarn test-renderHave ruled out map.loaded() returning
trueearly being the cause for the failing tests. The globe projection behavior when map.loaded() returnstrueis the same as other map projections.Launch Checklist