mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-09-22 08:02:14 -07:00
Add Metal-Frame-Capture.md
16
Developer-Guides/Metal-Frame-Capture.md
Normal file
16
Developer-Guides/Metal-Frame-Capture.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
### Metal Frame Capture with Ryujinx
|
||||||
|
|
||||||
|
Below is the method that I have found to produce reliable Metal GPU frame captures of Switch titles in Ryujinx, using Xcode and the lldb debugger. The first draft of this guide will be "quick and dirty;" hopefully, it will be updated continuously so it eventually conforms to best practice, if such a thing exists for what we're doing.
|
||||||
|
|
||||||
|
#### External Build System Project in Xcode
|
||||||
|
|
||||||
|
Xcode seems to be more willing to harness an application properly if it's nominally in charge of the entire build process, even if the application isn't using a standard C-family build toolchain. So we will add Ryujinx as an "External Build System" project, with `dotnet`, our favorite external build system.
|
||||||
|
|
||||||
|
1. Clone the Ryujinx github repository as normal: ```git clone https://github.com/Ryujinx/Ryujinx```
|
||||||
|
2. In Xcode, create a New Project. For the template, navigate to "Other", then search for or select "External Build System". For the "Build Tool", provide the location of your `dotnet` installation. For me, this is `/usr/local/share/dotnet/dotnet`. Create the project in any directory you wish; for convenience, you may want to create a folder in your cloned Ryujinx repository named `macos-xcode` or similar.
|
||||||
|
3. With your project created, for the build Arguments, substitute `build -c debug src/Ryujinx` (If you have better knowledge of Ryujinx dotnet build arguments, please put whatever here for your preferred Ryujinx build settings. This is just the most minimal way I found to get it building without poring over Ryujinx build scripts). For the directory, browse and pick the base directory for your cloned Ryujinx repository that contains the `Ryujinx.sln` file. Uncheck "Pass build settings in environment."
|
||||||
|
4. Optionally, add all project files to the project with "File->Add Files to...", creating folder references and selecting the build target.
|
||||||
|
5. Build the project.
|
||||||
|
6. Tell Xcode the binary you want it to debug by navigating to Product->Scheme->Edit Scheme. Under Info, then Executable, select Other.... Then, at the prompt, navigate to your repository folder, then the binary location. In the example from step 3, this would be `<base directory>/src/Ryujinx/bin/Debug/net8.0/Ryujinx`.
|
||||||
|
7. At this point, Ryujinx should be building properly, and launching and harnessing properly within the Xcode debugger. However, we're not done yet!
|
||||||
|
|
Reference in New Issue
Block a user