|
10 | 10 | - [Perf flame graph](#perf-flame-graph)
|
11 | 11 | - [GPU runtime](#gpu-runtime)
|
12 | 12 | - [Vendor tools](#vendor-tools)
|
| 13 | + - [Xcode's Metal debugger](#xcodes-metal-debugger) |
13 | 14 | - [Tracy RenderQueue](#tracy-renderqueue)
|
14 | 15 | - [Compile time](#compile-time)
|
15 | 16 |
|
@@ -147,6 +148,33 @@ For profiling GPU work, you should use the tool corresponding to your GPU's vend
|
147 | 148 |
|
148 | 149 | Note that while RenderDoc is a great debugging tool, it is _not_ a profiler, and should not be used for this purpose.
|
149 | 150 |
|
| 151 | +#### Xcode's Metal debugger |
| 152 | + |
| 153 | +Follow the steps below to start GPU debugging on macOS. There is no need to create an Xcode project. |
| 154 | + |
| 155 | +1. In the menu bar click on Debug > Debug Executable… |
| 156 | + |
| 157 | +  |
| 158 | + |
| 159 | +2. Select your executable from your project’s target folder. |
| 160 | +3. The Scheme Editor will open. If your assets are not located next to your executable, you can go to the Arguments tab and set `BEVY_ASSET_ROOT` to the absolute path for your project (the parent of your assets folder). The rest of the defaults should be fine. |
| 161 | + |
| 162 | +  |
| 163 | + |
| 164 | +4. Click the play button in the top left and this should start your bevy app. |
| 165 | + |
| 166 | +  |
| 167 | + |
| 168 | +5. Go back to Xcode and click on the Metal icon in the bottom drawer and then Capture in the following the popup menu. |
| 169 | + |
| 170 | +  |
| 171 | + |
| 172 | +6. Start debugging and profiling! |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | +These instructions were created for Xcode 16.4. |
| 177 | + |
150 | 178 | ### Tracy RenderQueue
|
151 | 179 |
|
152 | 180 | While it doesn't provide as much detail as vendor-specific tooling, Tracy can also be used to coarsely measure GPU performance.
|
|
0 commit comments