[webkit-changes] [WebKit/WebKit] 148031: [WebGPU] Add support for GPU Frame capture
mwyrzykowski
noreply at github.com
Mon Dec 12 18:46:05 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1480312ebc0f511ed39478773c075cb1ab91e5a1
https://github.com/WebKit/WebKit/commit/1480312ebc0f511ed39478773c075cb1ab91e5a1
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2022-12-12 (Mon, 12 Dec 2022)
Changed paths:
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/Device.h
M Source/WebGPU/WebGPU/Device.mm
M Source/WebGPU/WebGPU/Queue.mm
Log Message:
-----------
[WebGPU] Add support for GPU Frame capture
https://bugs.webkit.org/show_bug.cgi?id=249011
<radar://103045608>
Reviewed by Dean Jackson.
Add support for capturing the nth-frame during rendering
via notifyutil -p com.apple.WebKit.WebGPU.CaptureFrame as
well as the initial frame which includes all of the resource
creation commands in the gputrace via ...ToggleCaptureFirstFrame
Requires launching the process with __XPC_METAL_CAPTURE_ENABLED=1
These traces end up in /var/folders/.../com.apple.WebKit.GPU+org.webkit.MiniBrowser/
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::Device::createCommandEncoder):
Capture the frame starting before the command encoder is created.
* Source/WebGPU/WebGPU/Device.h:
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::frameCaptureEnabled):
(WebGPU::captureFirstFrame):
(WebGPU::registerForFrameCapture):
(WebGPU::Device::Device):
(WebGPU::Device::captureFrameIfNeeded const):
Add support MTLCaptureManager.
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::commitMTLCommandBuffer):
Stop frame capture after queue is committed.
Canonical link: https://commits.webkit.org/257770@main
More information about the webkit-changes
mailing list