Summary: | REGRESSION (iOS 15): Canvas resizing causes webpage to jetsam | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | akul | ||||
Component: | WebGL | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | declan, dino, jonlee, kbr, kkinnunen, kpiddington, sabouhallawa, simon.fraser, smoley, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Safari 15 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 231180 | ||||||
Attachments: |
|
Description
akul
2021-10-21 17:43:54 PDT
I can reproduce with iOS 15.1 beta. This is a jetsam, i.e. running out of memory. This bug is causing an experience ContinuumXR made for the Immersive Van Gogh Art Gallery in New York, Denver, and Las Vegas to no longer work. Users with ios 15 are no longer able to experience the pocket gallery exhibit. Created attachment 446159 [details]
reduced testacy
So the test jetsams because depth or stencil buffers are being allocated and they consume too much memory. The buffers are freed eventually, but not during the test resize iteration. The logic is: for (int i=0;i<10000;++i) resize() The buffers do not seem to leak permanently, temporarily. Maybe the buffers are retained in the command buffer, and we are clearing too many buffers without waiting for the previous buffer clears to complete. To workaround, the reporters can check if they need stencil and depth buffers for the default Framebuffer. If not, switching those off should work around this crash. Is this sample code a reduction of something that's out there in public? Is this the pattern being used by the Van Gogh art gallery, for example? Not sure whether the patch was intended for this bug, but this upstream patch to ANGLE seems to be addressing a similar concern: Metal: Canvas resizing causes webpage to run out of memory https://chromium-review.googlesource.com/c/angle/angle/+/3369922 |