Bug 259756 - GPUP WebGL in MiniBrowser still continuously allocates IOSurfaces
Summary: GPUP WebGL in MiniBrowser still continuously allocates IOSurfaces
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 255860
Blocks: 267054
  Show dependency treegraph
 
Reported: 2023-08-02 17:53 PDT by Kenneth Russell
Modified: 2024-01-04 03:50 PST (History)
4 users (show)

See Also:


Attachments
Test case (16.93 KB, text/html)
2023-08-02 17:53 PDT, Kenneth Russell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2023-08-02 17:53:45 PDT
Created attachment 467185 [details]
Test case

When MiniBrowser is run in WebKit2 mode with GPUP WebGL enabled, the attached test case causes IOSurfaces to be continuously allocated because they're in use too long. Increasing maxReusedDrawingBuffers in Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h causes the drawing buffers to be recycled. (Locally, I increased them to 6, but a smaller number would probably work.)

To reproduce:

1) Serve up the attached test case on localhost
2) Add an fprintf to stderr in this code which calls EGL_CreatePbufferFromClientBuffer:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm#L625
3) Tools/WebKit/build-webkit
4) Tools/WebKit/run-minibrowser

Note that there's a continuous stream of output.
Comment 1 Kenneth Russell 2023-08-02 17:54:52 PDT
Note: discovered while investigating ANGLE/Metal issue in Chromium: crbug.com/1468346 .
Comment 2 Radar WebKit Bug Importer 2023-08-09 17:54:11 PDT
<rdar://problem/113659847>