ANGLE Metal: The memory backing IOSurfaces of former client buffer pbuffers is leaked This affects mainly WebGL GPU process. To repro: Set "WebGL via Metal" and "GPU Process: WebGL" Navigate to https://webglsamples.org/aquarium/aquarium.html and observe GPUP memory consumption go up. footprint $(pgrep GPU.Development) GPU Process uses m_context->markDisplayBufferInUse(); to destroy each WebGL drawing buffer PBuffer before sending the IOSurface to WebContent process for compositing. This should detach the IOSurface from the EGL pbuffer and as such the pbuffer from the GL texture. Somehow the memory is still leaking through GPU process. Note: This leaking memory is leaked as "something something graphics memory" (via footprint tool). Normal IOSurfaces are marked as "IOSurface" by footprint. The leak doesn't exist in OpenGL backend.
<rdar://problem/85563187>
Yikes. Please tell us if it looks like this leak is inside ANGLE.
Created attachment 445088 [details] Patch
Created attachment 445092 [details] Patch
Created attachment 445096 [details] Patch for landing
> Yikes. Please tell us if it looks like this leak is inside ANGLE. No, this one was in WebKit, one of my added features.
Committed r286160 (244544@main): <https://commits.webkit.org/244544@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445096 [details].