jcm
2024-03-16 02:57:54 -05:00
committed by TSR Berry
parent 2ef7c0373e
commit 4ef2dbac0c

@@ -1,6 +1,6 @@
### 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.
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 practices, if such a thing can be said to exist in this situation.
#### External Build System Project in Xcode
@@ -8,11 +8,12 @@ Xcode seems to be more willing to harness an application properly if it's nomina
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!
3. With your project created, for the build Arguments, substitute `build -c debug src/Ryujinx`. 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."
* *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.*
5. Optionally, add all project files to the project with "File->Add Files to...", creating folder references and selecting the build target.
6. Build the project.
7. 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`.
8. At this point, Ryujinx should be building properly, and launching and harnessing properly within the Xcode debugger. However, we're not done yet!
* plist frame capture / metal api validation settings
* debug mvk substitution