[Webkit-unassigned] [Bug 227585] New: For large WebGL contexts, WebGL is spending a lot of time in allocating new Metal textures for default frame buffer backing store

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 1 08:14:59 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=227585

            Bug ID: 227585
           Summary: For large WebGL contexts, WebGL is spending a lot of
                    time in allocating new Metal textures for default
                    frame buffer backing store
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kkinnunen at apple.com
                CC: dino at apple.com, kbr at google.com, kkinnunen at apple.com,
                    kpiddington at apple.com
        Depends on: 227582

For large WebGL contexts, WebGL is spending a lot of time in allocating new Metal textures for default frame buffer backing store

Conditions:
1. Somewhat large WebGL context (e.g. fullscreen MacBookPro19,1 3072x1920)
2. Somewhat non-trivial amount of WebGL drawing (e.g. converting 4K video to texture via texImage2D and drawing it)

Causes a scenario where somehow WindowServer does not let the WebGL display buffers go, e.g. the IOSurface IsInUse property remains false when WebGL tries to obtain a new drawing buffer.

This causes WebGL to allocate a new drawing buffer.


Allocating the IOSurface seems to be fast, but then creating a Metal texture out of it seems to be slow.

Sampling reveals a lot of samples in [MTL...Device newTextureWithDescriptor:iosurface:plane:]


Reproable for example in 4k 360 YouTube: 
 - https://www.youtube.com/watch?v=HKNI658SKJ4
 - Let it load and observe sharp rendering
 - Stop the video
 - Rotate the video around with WASD keys
 - Vary the window size: small sized windows are smooth, large sized windows start to skip frames


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=227582
[Bug 227582] WebGL video to texture upload spends time clearing the uploaded-to texture
-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210701/a8943272/attachment.htm>


More information about the webkit-unassigned mailing list