New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 719507 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Chrome Beta 59 package on Linux does not include SwiftShader libraries

Project Member Reported by capn@chromium.org, May 8 2017

Issue description

SwiftShader libraries now ship as part of the installer on Windows, and the same was meant to happen on Linux with https://chromium.googlesource.com/chromium/src/+/d85baf0b71c69bbd181aaefc8a803611e03c8eed

Instead, chrome-beta does not have a swiftshader directory with libEGL.so and libGLESv2.so libraries in it. SwiftShader therefore fails to load for systems with blacklisted GPUs.

This is blocking some Google products from testing with Chrome 59 on the servers (b/37890144).  Issue 719213  is also related.
 

Comment 1 by capn@chromium.org, May 8 2017

If I run 'chrome/tools/build/make_zip.py out/Release/ chrome/tools/build/linux/FILES.cfg linux.zip', the archive contains swiftshader/libEGL.so and swiftshader/libGLESv2.so as expected. So I'm not sure why they're missing from the beta package.

Comment 2 by mmoss@chromium.org, May 8 2017

Cc: thomasanderson@chromium.org
Components: -OS>Packages Internals>Installer
These files are being built and included in the build archives (chrome-linux64.zip), but that does not automatically add them to the .deb and .rpm files. For that, you need to modify the packaging scripts in:

https://chromium.googlesource.com/chromium/src.git/+/master/chrome/installer/linux/

Note that there already are some versions of those files being installed:

https://chromium.googlesource.com/chromium/src.git/+/master/chrome/installer/linux/common/installer.include#166

I'm not sure how the swiftshader files relate to those, but if they both exist in the build, you might need to add some extra logic to resolve the conflict.

Comment 3 by capn@chromium.org, May 8 2017

Owner: capn@chromium.org
Status: Started (was: Available)
Thanks for the pointers!

Yes, the existing libEGL.so and libGLESv2.so are for ANGLE, which uses the GPU for rendering. SwiftShader is a fallback which uses the CPU instead, and its libraries are under the swiftshader/ directory to keep them separate.
Project Member

Comment 4 by bugdroid1@chromium.org, May 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8762c915f746100704a494b9dd09075030e77906

commit 8762c915f746100704a494b9dd09075030e77906
Author: capn <capn@chromium.org>
Date: Tue May 09 04:45:00 2017

Add SwiftShader libraries to Linux installer package.

BUG= 719507 

Review-Url: https://codereview.chromium.org/2868873003
Cr-Commit-Position: refs/heads/master@{#470221}

[modify] https://crrev.com/8762c915f746100704a494b9dd09075030e77906/chrome/installer/linux/common/installer.include

Maybe a bit late, but what is the reason we don't statically link libEGL.so and libGLESv2.so?

Comment 6 by capn@chromium.org, May 9 2017

The short answer is, because that's how OpenGL works.

Chrome can choose to load ANGLE's implementation, or SwiftShader's, or Mesa's, or whatever driver your system provides. Reversely you can literally copy SwiftShader's or ANGLE's libraries out of the Chrome directory and run other OpenGL ES applications with it.

Dynamic linking provides a strong guarantee that we're not depending on anything implementation specific (unless through Khronos ratified API extensions). It gives us flexibility in swapping between different implementations.

That said, there's an ongoing effort to statically link ANGLE. But ANGLE is different in that it loads another driver implementation as the back-end, translating OpenGL ES to either Direct3D or "desktop" OpenGL or another OpenGL ES implementation. The idea is that Chrome only needs to speak OpenGL ES, and ANGLE takes care of providing consistency between platforms, even if the native graphics driver is also OpenGL ES. So Chrome would no longer directly load the driver libraries, and since it will always pass all graphics commands to ANGLE it makes sense to statically link it.

In this upcoming architecture SwiftShader will still be one of several driver implementations that can be loaded by ANGLE, so they'll remain shared libraries for the foreseeable future.

Comment 7 by capn@chromium.org, May 9 2017

Labels: Merge-Request-59
This will need to be merged into M59 to unblock b/37890144.

Comment 8 by capn@chromium.org, May 9 2017

Cherry-pick to branch 3071 (linux-beta-m59) for review: https://codereview.chromium.org/2870753004

Comment 9 by capn@chromium.org, May 9 2017

Cc: -sugoi@chromium.org abdulsyed@chromium.org
Project Member

Comment 10 by sheriffbot@chromium.org, May 10 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, May 10 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/12037bf2488b1b3a57a622f52328f1c79ede7164

commit 12037bf2488b1b3a57a622f52328f1c79ede7164
Author: capn <capn@chromium.org>
Date: Wed May 10 14:34:51 2017

Add SwiftShader libraries to Linux installer package.

BUG= 719507 

TBR=mmoss@chromium.org
NOTRY=true
NOPRESUBMIT=true

(cherry picked from commit 8762c915f746100704a494b9dd09075030e77906)

Review-Url: https://codereview.chromium.org/2870753004
Cr-Commit-Position: refs/branch-heads/3071@{#501}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/12037bf2488b1b3a57a622f52328f1c79ede7164/chrome/installer/linux/common/installer.include

Comment 12 by capn@chromium.org, May 10 2017

Status: Fixed (was: Started)

Sign in to add a comment