Skip to content

Instantly share code, notes, and snippets.

@munrocket
Forked from slimbuck/webgpu_metal_capture.txt
Last active June 17, 2025 05:35
Show Gist options
  • Select an option

  • Save munrocket/1bb8b46a4e8d5de9891800eeb065e314 to your computer and use it in GitHub Desktop.

Select an option

Save munrocket/1bb8b46a4e8d5de9891800eeb065e314 to your computer and use it in GitHub Desktop.

Revisions

  1. munrocket revised this gist Jun 17, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion webgpu_metal_capture.txt
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ Tools/Scripts/build-webkit -cmakeargs="-DENABLE_WEBGPU_BY_DEFAULT=1" --debug

    2) Run your app

    __XPC_METAL_CAPTURE_ENABLED=1 Tools/Scripts/run-minibrowser --debug --url http://localhost:5000/index.html#/loaders/gsplat
    __XPC_METAL_CAPTURE_ENABLED=1 Tools/Scripts/run-minibrowser --debug --url http://localhost:3000/

    3) While app is running invoke WebGPU capture from a new terminal

  2. munrocket revised this gist Jun 17, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion webgpu_metal_capture.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    1) Clone and build WebKit

    git clone https://github.com/WebKit/WebKit.git WebKit
    gh repo clone WebKit/WebKit
    cd WebKit
    Tools/Scripts/build-webkit -cmakeargs="-DENABLE_WEBGPU_BY_DEFAULT=1" --debug

  3. @slimbuck slimbuck created this gist May 13, 2024.
    18 changes: 18 additions & 0 deletions webgpu_metal_capture.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    1) Clone and build WebKit

    git clone https://github.com/WebKit/WebKit.git WebKit
    cd WebKit
    Tools/Scripts/build-webkit -cmakeargs="-DENABLE_WEBGPU_BY_DEFAULT=1" --debug


    2) Run your app

    __XPC_METAL_CAPTURE_ENABLED=1 Tools/Scripts/run-minibrowser --debug --url http://localhost:5000/index.html#/loaders/gsplat

    3) While app is running invoke WebGPU capture from a new terminal

    notifyutil -p com.apple.WebKit.WebGPU.CaptureFrame

    4) File is written to HD, WebKit terminal displays the path.

    5) Load the file into xcode (file open) and profit.