Add instructions for GPU debugging in Xcode (#19915)
# Objective - Using Xcode can be confusing to setup for rust projects. # Solution - Add instructions to docs/profiling.md for how to use start debugging a bevy project with Xcode's GPU debugging/profiling tools.
This commit is contained in:
parent
e42d386625
commit
c8cdb1197e
@ -10,6 +10,7 @@
|
|||||||
- [Perf flame graph](#perf-flame-graph)
|
- [Perf flame graph](#perf-flame-graph)
|
||||||
- [GPU runtime](#gpu-runtime)
|
- [GPU runtime](#gpu-runtime)
|
||||||
- [Vendor tools](#vendor-tools)
|
- [Vendor tools](#vendor-tools)
|
||||||
|
- [Xcode's Metal debugger](#xcodes-metal-debugger)
|
||||||
- [Tracy RenderQueue](#tracy-renderqueue)
|
- [Tracy RenderQueue](#tracy-renderqueue)
|
||||||
- [Compile time](#compile-time)
|
- [Compile time](#compile-time)
|
||||||
|
|
||||||
@ -147,6 +148,33 @@ For profiling GPU work, you should use the tool corresponding to your GPU's vend
|
|||||||
|
|
||||||
Note that while RenderDoc is a great debugging tool, it is _not_ a profiler, and should not be used for this purpose.
|
Note that while RenderDoc is a great debugging tool, it is _not_ a profiler, and should not be used for this purpose.
|
||||||
|
|
||||||
|
#### Xcode's Metal debugger
|
||||||
|
|
||||||
|
Follow the steps below to start GPU debugging on macOS. There is no need to create an Xcode project.
|
||||||
|
|
||||||
|
1. In the menu bar click on Debug > Debug Executable…
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
2. Select your executable from your project’s target folder.
|
||||||
|
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.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
4. Click the play button in the top left and this should start your bevy app.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
5. Go back to Xcode and click on the Metal icon in the bottom drawer and then Capture in the following the popup menu.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
6. Start debugging and profiling!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
These instructions were created for Xcode 16.4.
|
||||||
|
|
||||||
### Tracy RenderQueue
|
### Tracy RenderQueue
|
||||||
|
|
||||||
While it doesn't provide as much detail as vendor-specific tooling, Tracy can also be used to coarsely measure GPU performance.
|
While it doesn't provide as much detail as vendor-specific tooling, Tracy can also be used to coarsely measure GPU performance.
|
||||||
|
Loading…
Reference in New Issue
Block a user