dad...@google.com, geof...@chromium.org
Allowing automatic fallback to WebGL backed by SwiftShader is deprecated and will be removed. This has been noted in DevTools since Chrome 130.
WebGL context creation will fail instead of falling back to SwiftShader. This is for two primary reasons:
1. SwiftShader is a high security risk due to JIT-ed code running in Chromium's GPU process.
2. Users have a poor experience when falling back from a high-performance GPU-backed WebGL to a CPU-backed implementation. Users have no control over this behavior and it is difficult to describe in bug reports.
SwiftShader is a useful tool for web developers to test their sites on systems that are headless or do not have a supported GPU. This use case will still be supported by opting in but is not intended for running untrusted content.
To opt-in to lower security guarantees and allow SwiftShader for WebGL, run the chrome executable with the --enable-unsafe-swiftshader command-line switch.
During the deprecation period, a warning will appear in the javascript console when a WebGL context is created and backed with SwiftShader. Passing --enable-unsafe-swiftshader will remove this warning message. This deprecation period began in Chrome 130.
Chromium and other browsers do not guarantee WebGL availability. Please test and handle WebGL context creation failure and fall back to other web APIs such as Canvas2D or an appropriate message to the user.
SwiftShader is an internal implementation detail of Chromium, not a public web standard, therefore buy-in from other browsers is not required. The devices covered by SwiftShader (primarily older Windows devices) are likely already incompatible with WebGL in other browsers.
SwiftShader is not used on mobile; this only applies to Desktop platforms.
SwiftShader is used by devices without hardware acceleration for WebGL. This is approximately 2.7% of WebGL contexts. However, WebGL is considered fallible and in many cases, these draws are not performant and provide an effectively unusable experience for users. Many applications, such as Google Maps, prefer to fail out rather than use SwiftShader.
None
--enable-unsafe-swiftshader command-line switch.
AllowSwiftShaderFallback
https://issues.chromium.org/40277080
https://launch.corp.google.com/launch/4351104
https://chromestatus.com/feature/5166674414927872?gate=5188866041184256
This intent message was generated by Chrome Platform Status.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGkh42KV4DrSSyEgJaF4DnFOXAye-wRLrfD-LKGNkWhyWzshLA%40mail.gmail.com.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c5131675-dff4-4aa0-8e84-4cdc373e3035n%40chromium.org.
Hi David,
The initial message states that SwiftShader primarily covers older Windows devices. Beyond those, there are a non-trivial set of enterprise users that use thin clients to connect to a remote Windows device which is often running in a VM without access to a physical GPU.
For example, this applies to the Microsoft Dev Box offering (https://azure.microsoft.com/en-us/products/dev-box/).
Unfortunately, enterprise clients often turn off telemetry. So, I would assume any UMA-derived metrics to be undercounting the population.
It’s likely there are certain line-of-business and/or consumer-oriented sites that have a hard dependency on WebGL to be fully functional.
Have you considered, on Windows, targeting WARP (https://learn.microsoft.com/en-us/windows/win32/direct3darticles/directx-warp) instead? I don’t know if there are other viable alternatives on other OSes, but if the primary impacted clients are Windows perhaps that would be a sufficient mitigation.
To help enterprise customers reason about how much this is going to impact them, it would be helpful to have an enterprise policy to control this. This is a common pattern for potentially high-impact changes.
In its initial phase, the policy would enable motivated enterprises to forcibly disable SwiftShader as a scream test. And after you switch over the default, it could enable enterprises caught unaware to have some additional window of time to plan mitigations (by re-enabling it via policy) before you proceed with fully deprecating support and remove the policy.
Can you comment on if you plan to add such a policy or, if not, why not?
Thanks!
Hi Geoff,
My suggestion re: a policy was not to have one that is supported indefinitely.
Many high-risk deprecations have had a policy lasting for, I believe, as little as 3 major version releases. Having such a thing helps mitigate the concern that the risk analysis was way off (which could then mean needing to do a stable respin if your risk analysis was off). If a policy is available, impacted enterprises can quickly self-remediate, report what broke once you flip over the default, and have a little bit more of a window to plan mitigations tied to the removal of the policy (since they’d now be aware of what broke and why).
Thanks,
Erik