WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
218949
WebGL instanced draw calls are very slow on iPhone 12 Pro
https://bugs.webkit.org/show_bug.cgi?id=218949
Summary
WebGL instanced draw calls are very slow on iPhone 12 Pro
Akihiko Kusanagi
Reported
2020-11-14 18:44:02 PST
WebGL instanced draw calls are very slow in any browser on iPhone 12 Pro. There is no performance issue in the same browser/OS versions on my old iPhone 8 Plus. Initially I noticed this in deck.gl code, but later realized that this issue is not deck.gl specific as a simple three.js program that uses instanced draw calls has the same issue. How to reproduce: - Instancing example (
https://cdn.rawgit.com/pailhead/three.js/instancing-part2/examples/webgl_interactive_cubes.html
) in this article:
https://medium.com/@pailhead011/instancing-with-three-js-part-2-3be34ae83c57
- Deck.gl examples (GeoJsonLayer(Polygons), GeoJsonLayer(Paths), ...) in this page:
https://deck.gl/examples
Environment: - Browser: Safari 14, Chrome (for iOS) 86.0.4240.93 and FireFox (for iOS) 29.1 - OS: iOS 14.1 and 14.2 - Device: iPhone 12 Pro
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-11-14 21:25:20 PST
<
rdar://problem/71408222
>
Kenneth Russell
Comment 2
2020-11-16 14:20:43 PST
Hmm, that's interesting. Certainly unrelated, but coincidentally, there was an instancing performance regression in Qualcomm's Adreno driver in Android R:
http://crbug.com/1123700
. It was fixed in a subsequent driver release. Kimmo or Dean, can either of you confirm whether this is a regression from the switch to ANGLE? Or is it hardware-specific and unrelated to ANGLE?
Kimmo Kinnunen
Comment 3
2020-11-16 23:52:16 PST
Thanks for the report!
https://threejs.org/examples/webgl_interactive_cubes.html
iPhone Xr iOS 14.2 60fps iPhone 12 iOS 14.2 18fps It appears to be HW-specific regression.
Kenneth Russell
Comment 4
2020-11-17 10:53:37 PST
Thanks for confirming Kimmo. Can this performance regression be reported to Apple's OpenGL ES driver team? Raising to Major severity - in recent years most WebGL applications have transitioned to using instanced draw calls to achieve better scaling, and this regression will adversely affect the entire ecosystem. Kimmo, could you perhaps track progress of this report through Apple's internal bug tracker?
Akihiko Kusanagi
Comment 5
2020-12-09 08:46:04 PST
Is there any update on this issue?
Toni Martí
Comment 6
2021-02-02 04:28:44 PST
Ping! How it's going with this issue?
Akihiko Kusanagi
Comment 7
2021-02-12 01:42:36 PST
I still see this regression on iOS 14.4.
Akihiko Kusanagi
Comment 8
2021-02-27 19:46:36 PST
This performance regression is seen on all A14 Bionic devices.
Marcin
Comment 9
2021-03-17 09:57:13 PDT
I can't reproduce it on iPad Air 2020 (A14 Bionic) with iPadOS 14.4.1 Repro case
https://threejs.org/examples/webgl_interactive_cubes.html
runs easily at 60fps
Akihiko Kusanagi
Comment 10
2021-03-18 00:50:10 PDT
> I can't reproduce it on iPad Air 2020 (A14 Bionic) with iPadOS 14.4.1
>
> Repro case
https://threejs.org/examples/webgl_interactive_cubes.html
runs easily at 60fps
It's the original three.js example which runs with no problem. I see a performance regression in
https://cdn.rawgit.com/pailhead/three.js/instancing-part2/examples/webgl_interactive_cubes.html
, the instancing version of it.
Marcin
Comment 11
2021-03-18 02:05:37 PDT
Confirmed,
https://cdn.rawgit.com/pailhead/three.js/instancing-part2/examples/webgl_interactive_cubes.html
runs 18fps on iPad Air 2020, iPadOS 14.4.1
Gary Herman
Comment 12
2021-04-01 06:42:29 PDT
We are also seeing significant performance issues in our WebGL application at
https://human.biodigital.com
on these devices. Has Apple acknowledged this issue? As more people get iPhone 12 we are seeing an increase in the number of complaints from our users.
Frank Sculli
Comment 13
2021-04-12 12:29:37 PDT
Here are two videos clearly showing the regression in FPS going from the iPhone 11 to the same 3D graphics running on the iPhone 12. iPhone 11
https://human.biodigital.com/tmp/rpreplay_final1617998863.mp4
iPhone 12
https://human.biodigital.com/tmp/rpreplay_final1617998786.mp4
And a link to the same model if you would like to try it:
https://human.biodigital.com/viewer/?be=4Ima&ui-info=true&ui-search=true&ui-undo=true&ui-fullscreen=true&ui-nav=true&ui-tools=true&ui-help=true&ui-chapter-list=false&ui-label-list=true&ui-anatomy-descriptions=false&ui-tutorial=false&ui-loader=circle&ui-whiteboard=true&ui-layers=true&ui-anatomy-labels=true&disable-scroll=false&dk=4b331fad5eef5d6a1677a2d5fa1f7c373cbba0be&load-rotate=6
@Kimmo do you know if Apple is looking into this? thanks!
Kimmo Kinnunen
Comment 14
2021-04-13 03:27:39 PDT
The enablement of ANGLE Metal backend on iPhone seems to fix the immediate performance issue here.
Kenneth Russell
Comment 15
2021-04-13 12:12:13 PDT
To the reporters: we're collaborating as quickly as possible to shake out the bugs from ANGLE's Metal backend that Apple's made tremendous improvements to. That sounds like it will be the fastest resolution to this device-specific performance issue.
Lasse Laakkonen
Comment 16
2021-04-15 04:22:26 PDT
This
https://cdn.rawgit.com/pailhead/three.js/instancing-part2/examples/webgl_interactive_cubes.html
should probably not be used for any testing, it seems to be running ThreeJS revision "97dev" from 2018:
https://github.com/mrdoob/three.js/releases?after=r98
Also: Assuming that the issue is on all devices with A14 Bionic chips. 1. Since Kimmo was able to reproduce the issue on 2020-11-16 in
https://threejs.org/examples/webgl_interactive_cubes.html
using an iPhone 12 and now the issue can not be reproduced on that page with a iPad Air 4th gen 2020, it would mean that issue would have been fixed in Three.js? 2. Since for example all of these work at FPS 60 on an iPad Air 4th gen 2020, Three.js has fixed / worked around the issue somehow? -
https://threejs.org/examples/webgl_interactive_cubes.html
-
https://threejs.org/examples/#webgl_instancing_dynamic
-
https://threejs.org/examples/#webgl_instancing_performance
-
https://threejs.org/examples/#webgl_instancing_raycast
-
https://threejs.org/examples/#webgl_instancing_scatter
Akihiko Kusanagi
Comment 17
2021-04-15 06:35:41 PDT
I replaced three.js in
https://cdn.rawgit.com/pailhead/three.js/instancing-part2/examples/webgl_interactive_cubes.html
with the latest version (r127), but FPS is still around 18. See the codepen:
https://codepen.io/nagixx/full/RwKJRQy
Steven Briscoe
Comment 18
2021-05-20 04:15:32 PDT
Is there any movement on this issue? I'm facing this same issue and we have customers complaining due to the performance being really bad. All other iOS devices seem unaffected but the iPhone 12 seems particularly bad. This seems to be the same issue here:
https://github.com/visgl/deck.gl/issues/5101
Appreciate the help! Steve
Steven Briscoe
Comment 19
2021-05-20 04:21:31 PDT
(In reply to Steven Briscoe from
comment #18
)
> Is there any movement on this issue? I'm facing this same issue and we have > customers complaining due to the performance being really bad. All other iOS > devices seem unaffected but the iPhone 12 seems particularly bad. > > This seems to be the same issue here: >
https://github.com/visgl/deck.gl/issues/5101
> > Appreciate the help! > Steve
Quick edit: I've also been told that iOS 14.6 does not address this issue.
Frank Sculli
Comment 20
2021-06-10 14:53:18 PDT
Following up on Steve's comment above, as more people have the iPhone 12 we are now receiving a ton of complaints. Is it possible to provide some insight into the status of this fix? Much appreciated!
Akihiko Kusanagi
Comment 21
2021-09-20 22:05:20 PDT
Today I updated my iPhone 12 Pro to iOS 15, and I confirmed that this instancing performance issue was fixed! At least, my application and deck.gl examples all work smoothly, so I set this bug to RESOLVED.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug