Bug 239518
Summary: | ANGLE_instanced_arrays has poor performance, Intel | ||
---|---|---|---|
Product: | WebKit | Reporter: | MrMartian <oconnorct1> |
Component: | WebGL | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | dino, kbr, kkinnunen, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 15 | ||
Hardware: | Mac (Intel) | ||
OS: | macOS 12 | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=239015 | ||
Bug Depends on: | |||
Bug Blocks: | 231180 |
MrMartian
I'm on MacOS Monterey 12.3 (21E230)
MacBook Pro (15-inch, 2017)
Radeon Pro 560 4 GB
Intel HD Graphics 630 1536 MB
After getting feedback from Kenneth Russel I was going to try and find time to build a demo of why instanced arrays perform poorly in both WebGL and WebGL2 but I found an example online that drops frame rates with a very basic low CPU/GPU effort example.
Initial discussion
https://bugs.webkit.org/show_bug.cgi?id=205663
A blog discussing the use of instanced arrays:
https://blog.tojicode.com/2013/07/webgl-instancing-with.html
The example:
http://media.tojicode.com/webgl-samples/instancing.html
If you full screen in safari and move around (click down and drag), you will see Safari performs poorly with instanced arrays.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kimmo Kinnunen
I can repro on same hardware.
Slow on integrated Intel, fast on dgpu AMD.
Fast on OpenGL, slow on Metal.
Kimmo Kinnunen
Note, though: At least initially I could not see a difference with "use instancing" on, off. both were slow.
Kenneth Russell
Could this have the same root cause as performance Bug 239015?
MrMartian
(In reply to Kenneth Russell from comment #3)
> Could this have the same root cause as performance Bug 239015?
WOW! I tested it and got perfect frames in WebGL 1 !!!
In WebGL2 I still get frame drops but not as bad.. sitting around 20fps rather than 1-5. So there is still some kind of problem with Angle. My own project is not open source, but if I put an example online (both Webgl1 and webgl2 versions) is it possible to gather anything meaningful?
MrMartian
Whoops. Seems I jumped the gun.
Many calls to drawArraysInstanced causes the whole thing to crash and burn again.
Meanwhile, if there is only one drawArraysInstanced call, the performance is outstanding.
I *think* the problem is primarily if I call "drawArraysInstanced", switch to calling something else like "drawArrays", then go back to "drawArraysInstanced" in the same frame/batch of calls, it seizes up.
MrMartian
Scratch my last comment -_- I was accidentally on WebGL2 again.
100% getting 60FPS consistently with WebGL1 and it's an awesome feeling.
Terrible performance on WebGL2, but I can avoid it with Safari for now.
Radar WebKit Bug Importer
<rdar://problem/92357654>