Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshots for CI on MacOS #19120

Closed
1 of 3 tasks
munrocket opened this issue Apr 13, 2020 · 6 comments · Fixed by #19121
Closed
1 of 3 tasks

Screenshots for CI on MacOS #19120

munrocket opened this issue Apr 13, 2020 · 6 comments · Fixed by #19121

Comments

@munrocket
Copy link
Contributor

Description of the problem

OS
  • Windows
  • macOS
  • Linux

Right now all contributions in Three.js checked with regression tests. If you make a new PR you should also update screenshot in order to simplify code reviews. But current screenshot maker not works in MacOS, and somebody need to create screenshots on Windows or Linux for those users. This is not handy at all. If you have MacBook can you help me to fix CI script for MacOS?

Solution

Try to change flags to --use-gl=swiftshader in file below

'--use-gl=egl',

or add some another, like --disable-setuid-sandbox and check what gives this command

npm run make-screenshot

right now it produces black images on MacOS.

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 13, 2020

If I use --use-gl=swiftshader, the screenshot is not black anymore. This is the result for misc_controls_fly.

misc_controls_fly

However, git still shows a diff so the result is not the same as before. Adding --disable-setuid-sandbox made no difference.

or add some another

Except of --disable-setuid-sandbox, what are these other options?

@munrocket
Copy link
Contributor Author

If diff not big enough all is ok.

Here some another flags that modify render:

'--use-gl=desktop',
'--use-angle=gl',
'--use-gl=omesa',
'--enable-surface-synchronization',
'--run-all-compositor-stages-before-draw',
'--disable-threaded-animation',
'--disable-threaded-scrolling',
'--disable-checker-imaging'

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 13, 2020

--use-gl=desktop produce a black picture, too. However, using --use-angle=gl or --use-gl=omesa instead of --use-gl=egl also works. The other flags seem to have no effect.

@munrocket
Copy link
Contributor Author

@Mugen87 intresing! I probably just add --use-gl=swiftshader. Seems that Chrome with this flag not use opengl backend but somehow render canvas with metal.

@mrdoob
Copy link
Owner

mrdoob commented Apr 13, 2020

AFAIK, angle is GPU and swiftshader is CPU.

If we want to avoid GPU bugs, we may want to go with --user-gl=swiftshader everywhere...

@munrocket
Copy link
Contributor Author

Wow, I am not thought that we can do it without GPU.

TEST PASSED! 356 screenshots correctly rendered.

Also we have all platforms inside CI and can check script with one button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants