forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new flag to allow using SwANGLE as WebGL fallback
Currently, Chrome uses legacy SwiftShader GL as the WebGL fallback when a hardware GPU isn't usable for the purpuse of rendering WebGL content. As we're in the process of changing legacy SwiftShader GL to SwANGLE, this CL adds a new flag which allows using SwANGLE for WebGL only. To clarify, current switches with legacy SwiftShader GL: Software GL: --use-gl=swiftshader Software WebGL only: --use-gl=swiftshader-webgl With SwANGLE, the new switches will be: Software GL: --use-gl=angle --use-angle=swiftshader Software WebGL only: --use-gl=angle --use-angle=swiftshader-webgl Bug: chromium:1060139 Change-Id: I8d0382ac3a12c1578dfc0e62fc1949a0a9c66bd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2845229 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Cr-Commit-Position: refs/heads/master@{#876794}
- Loading branch information
Showing
7 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Using Chromium with SwiftShader | ||
|
||
SwiftShader is an open-source high-performance implementation of the Vulkan and OpenGL ES graphics APIs which runs purely on the CPU. Thus no graphics processor (GPU) is required for advanced (3D) graphics. | ||
|
||
Chromium uses SwiftShader in two different ways: | ||
|
||
1) **As the OpenGL ES driver** | ||
|
||
When Chromium uses SwiftShader as the OpenGL ES driver, Chromium behaves as if it was running a on regular GPU, while actually running on SwiftShader. This allows Chromium to exercise hardware only code paths on GPU-less bots. | ||
|
||
2) **As the WebGL fallback** | ||
|
||
When Chromium uses SwiftShader as the WebGL fallback, Chromium runs in all software mode and only uses SwiftShader to render WebGL content. | ||
|
||
SwiftShader also provides 2 different libraries: | ||
|
||
1) **The legacy SwiftShader Open GL ES libraries** | ||
|
||
Legacy SwiftShader includes a GLES library and an EGL library, in order to provide a complete solution to run OpenGL ES content. | ||
|
||
*Do not use these libraries if possible, they are being phased out in favor of SwANGLE (ANGLE + SwiftShader Vulkan).* | ||
|
||
2) **The SwiftShader Vulkan library** | ||
|
||
SwiftShader Vulkan can be used both to render Vulkan content directly, or OpenGL ES content when use in conjunction with the ANGLE library. | ||
|
||
## Relevant Chromium command line switches | ||
|
||
When running the **chrome** executable from the command line, SwiftShader can be enabled using the following Switches: | ||
1) As the OpenGL ES driver, SwANGLE (ANGLE + SwiftShader Vulkan) | ||
>**\-\-use-gl=angle \-\-use-angle=swiftshader** | ||
2) As the WebGL fallback, SwANGLE (ANGLE + SwiftShader Vulkan) | ||
>**\-\-use-gl=angle \-\-use-angle=swiftshader-webgl** | ||
3) As the OpenGL ES driver, legacy SwiftShader Open GL ES libraries | ||
> **\-\-use-gl=swiftshader** | ||
4) As the WebGL fallback, legacy SwiftShader Open GL ES libraries | ||
>**\-\-use-gl=swiftshader-webgl** | ||
5) As the Vulkan driver (requires the [enable_swiftshader_vulkan](https://source.chromium.org/chromium/chromium/src/+/master:gpu/vulkan/features.gni;l=16) feature) | ||
>**--use-vulkan=swiftshader** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters