RESOLVED CONFIGURATION CHANGED231625
Performance regression on VSM32 version of shadow map on Safari 15 MacOS
https://bugs.webkit.org/show_bug.cgi?id=231625
Summary Performance regression on VSM32 version of shadow map on Safari 15 MacOS
Dean Jackson
Reported 2021-10-12 14:54:12 PDT
See https://github.com/playcanvas/engine/issues/3509 This runs at realtime in other browsers / Safari 14, but Safari 15 gives us around 2fps. VSM8 and VSM16 are performant - even though run slower than in other browsers, but VSM32 is very slow (2 fps) - we must be hitting some some slow path / bug with this one specific texture format. Steps to repro: http://playcanvas.github.io/#/graphics/shadow-cascades select VSM32 option
Attachments
Radar WebKit Bug Importer
Comment 1 2021-10-12 14:54:23 PDT
Kenneth Russell
Comment 2 2021-10-12 14:58:25 PDT
Is this happening on specific hardware? Safari 15 and Safari Technology Preview on a 2017 15" dual-GPU MacBook Pro seem to perform about the same as Chrome Beta (95).
Dean Jackson
Comment 3 2021-10-12 15:59:30 PDT
I didn't see this myself on trunk (running Monterey) - iMac Pro.
Dean Jackson
Comment 4 2021-10-12 15:59:57 PDT
Yeah, so either hardware specific or already fixed.
Martin
Comment 5 2021-10-13 06:14:52 PDT
I tried both of these versions and get the same performance: Safari Technology Preview Release 133 (Safari 15.4, WebKit 16613.1.2.2) Safari Version 15.0 (16612.1.29.41.4, 16612) I'm running this on Big Sur, version 11.6, MacBook Pro 16" 2019, AMD Radeon Pro 5500M Normally I run it with two external screens and that's around 2fps including whole OS .. even mouse cursor refreshes this slow. I disconnected those two screens and that improves performance to around 7fps, and the mouse cursor is completely smooth (60fps). This is confirmed by my colleagues, but they all run on the exact same model of MacBook Pro.
Kyle Piddington
Comment 6 2022-01-20 12:46:35 PST
Hi Martin, Sorry for the late responses here. Something worth discussing is changes in how a graphics device is selected in Safari 15 vs Safari 14. With ANGLE on Metal, we have better control over which device WebKit chooses to display WebGL content. In the interest of battery life, by default, we will select the low power GPU. This may differ from As a quick question: How does play canvas select a graphics device? Is it possible to specify the attribute 'high-performance' as part of the canvas attributes ? { powerPreference: 'high-performance' } I see some work here (https://github.com/playcanvas/editor/issues/175) for this support, can you confirm that the demo is running with the high-powered GPU specified, rather than the lower-powered Intel GPU?
Martin
Comment 7 2022-01-21 02:40:53 PST
Hi Kyle, In the repro case project I linked we don't specify powerPreference at all, so it would use the default. I confirmed that setting power preference to 'high-performance' does switch to discrete GPU, as visible in the Graphics Card column in the Activity Monitor showing Yes for Safari. I confirmed this also has the same effect: changing System Preferences -> Battery -> Power Adapter -> Automatic graphics switching to Off. So with the discrete GPU being used (either of the ways), it makes no visible performance difference. Both built in and discrete GPU seems to be running this example at about similar slow speed (I only see frame timing .. basically a multiple of 16ms as there's no gpu timer available in Safari). I also tried Safari Tech Preview, with the same results. My current versions: OS Big Sur: 11.6.2 (20G314) Safari: Version 15.2 (16612.3.6.1.8, 16612) Safari Tech Preview: Release 137 (Safari 15.4, WebKit 16613.1.11.8)
Martin
Comment 8 2022-03-01 06:43:50 PST
I can no longer reproduce this issue on macOS Monterey that I upgraded to.
Alexey Proskuryakov
Comment 9 2022-10-13 16:46:41 PDT
Thank you for following up, marking as Configuration Changed.
Note You need to log in before you can comment on or make changes to this bug.