WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
275422
[WebGPU] IPC copies too much data leading to jetsams on iOS
https://bugs.webkit.org/show_bug.cgi?id=275422
Summary
[WebGPU] IPC copies too much data leading to jetsams on iOS
Mike Wyrzykowski
Reported
2024-06-12 15:27:26 PDT
[WebGPU] IPC copies too much data leading to jetsams on iOS We can use SharedMemory to avoid this I think
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-06-12 15:27:55 PDT
<
rdar://problem/129714560
>
Mike Wyrzykowski
Comment 2
2024-06-12 15:31:23 PDT
The following IPC messages are problematic: Source/WebKit/GPUProcess/graphics/WebGPU//RemoteQueue.messages.in: void WriteBuffer(WebKit::WebGPUIdentifier identifier, WebCore::WebGPU::Size64 bufferOffset, Vector<uint8_t> data) Source/WebKit/GPUProcess/graphics/WebGPU//RemoteQueue.messages.in: void WriteTexture(WebKit::WebGPU::ImageCopyTexture destination, Vector<uint8_t> data, WebKit::WebGPU::ImageDataLayout imageDataLayout, WebKit::WebGPU::Extent3D size) Source/WebKit/GPUProcess/graphics/WebGPU//RemoteBuffer.messages.in: void GetMappedRange(WebCore::WebGPU::Size64 offset, std::optional<WebCore::WebGPU::Size64> size) -> (std::optional<Vector<uint8_t>> data) Synchronous Source/WebKit/GPUProcess/graphics/WebGPU//RemoteBuffer.messages.in: void Copy(Vector<uint8_t> data, size_t offset)
Mike Wyrzykowski
Comment 3
2024-06-13 15:36:22 PDT
It looks like Unity is also passing a large ArrayBuffer to writeTexture and writeBuffer, but we copy the entire ArrayBuffer passing over to IPC instead of only the bytes which will be needed by GPUQueue.writeTexture and GPUQueue.writeBuffer
Mike Wyrzykowski
Comment 4
2024-06-13 17:03:46 PDT
Fixing this and
https://boat-demo.cds.unity3d.com/
loads almost instantly now, comparable to Chrome
Mike Wyrzykowski
Comment 5
2024-06-13 23:58:44 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/29809
EWS
Comment 6
2024-06-18 09:52:55 PDT
Committed
280124@main
(bdf8fc7b595b): <
https://commits.webkit.org/280124@main
> Reviewed commits have been landed. Closing PR #29809 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug