Regarding swiftshader and angle flags in Linux

777 views
Skip to first unread message

Sohan Jyoti Ghosh

unread,
Aug 2, 2022, 3:40:09 PM8/2/22
to Graphics-dev
Hi !

Does running chrome with "--use-gl=angle --use-angle=swiftshader" mean we would still follow the gpu/oop rasterization path and do regular accelerated path for compositing i.e. OOP-D and SkiaRenderer. 
But, the final driver calls would be emulated in SW ?

Especially for a scenario, where the device is without a real GPU core but we would still want to follow the accelerated rendering path with separate GPU/Viz process etc.

How would Skia react to this, would it still assume its Ganesh/Vk backed ? And follow its HW path ?

Br,
Sohan

Nicolas Capens

unread,
Aug 10, 2022, 9:37:46 AM8/10/22
to Sohan Jyoti Ghosh, Graphics-dev
Hi Sohan,

Indeed this combination of flags results in ANGLE providing an OpenGL ES implementation using SwiftShader's CPU-based Vulkan implementation as the backend.

Other components are mostly unaware of this, so they'll use their OpenGL ES rendering paths. You can see this on the chrome://gpu page. Most features will say "Hardware accelerated", while GL_RENDERER mentions SwiftShader.

Cheers,
Nicolas

Nicolas Capens

unread,
Aug 11, 2022, 7:02:07 AM8/11/22
to Sohan Jyoti Ghosh, Graphics-dev
--disable-gpu will prevent any use of the GPU, but WebGL is still supported through ANGLE + SwiftShader, so there's still a GL_RENDERER string. Skia will use its dedicated CPU backend though.

This dedicated CPU backend is faster than SwiftShader in most cases, because it was hand-tuned for Skia's exact needs while ANGLE and SwiftShader must comply with the many requirements of a generic 3D rendering API. So this performance gap is well known, but we're making an effort to reduce it where possible.

On Thu, Aug 11, 2022 at 9:07 AM Sohan Jyoti Ghosh <soh...@chromium.org> wrote:
Hi Nicolas !

Thanks, we verified that's indeed the case. Whats odd was, even with flags like --disable-gpu, the GL_Renderer mentions Angle and SwiftShader. Wouldn't some other string like "GL Not used" been more appropriate?

The other noticeable one was  the performance, it seems the "--disable-gpu" benchmark scores (browserbench.org - jetstream, motionmark etc. ) are better than, if we keep the accelerated path enabled but fall-back to SwiftShader and ANGLE at the last stage with "--use-gl=angle --use-angle=swiftshader". Maybe its already known, but looked a little odd to me, especially Motionmark.

Br,
Sohan

Sohan Jyoti Ghosh

unread,
Aug 11, 2022, 9:52:50 AM8/11/22
to Nicolas Capens, Graphics-dev
Hi Nicolas !

Thanks, we verified that's indeed the case. Whats odd was, even with flags like --disable-gpu, the GL_Renderer mentions Angle and SwiftShader. Wouldn't some other string like "GL Not used" been more appropriate?

The other noticeable one was  the performance, it seems the "--disable-gpu" benchmark scores (browserbench.org - jetstream, motionmark etc. ) are better than, if we keep the accelerated path enabled but fall-back to SwiftShader and ANGLE at the last stage with "--use-gl=angle --use-angle=swiftshader". Maybe its already known, but looked a little odd to me, especially Motionmark.

Br,
Sohan

On Wed, Aug 10, 2022 at 4:37 PM Nicolas Capens <ca...@google.com> wrote:

Sohan Jyoti Ghosh

unread,
Aug 12, 2022, 1:16:47 PM8/12/22
to Nicolas Capens, Graphics-dev
Thanks for the details, that helps.

Br,
Sohan
Reply all
Reply to author
Forward
0 new messages