Credit @jcm93 for writing this guide

TSR Berry 2024-03-16 20:14:38 +01:00
parent 11dee22361
commit 6fdfe3de32
No known key found for this signature in database
GPG Key ID: 52353C0A4CCA15E2
1 changed files with 4 additions and 4 deletions

@ -1,10 +1,10 @@
## Metal Frame Capture with Ryujinx *Written by: [@jcm93](https://github.com/jcm93)*
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, insofar as such a thing can be said to exist in this situation. 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, insofar as such a thing can be said to exist in this situation.
<img width="1840" alt="metal-frame-capture" src="Developer-Guides/assets/metal-frame-capture.png"> <img width="1840" alt="metal-frame-capture" src="Developer-Guides/assets/metal-frame-capture.png">
### External Build System Project in Xcode ## 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 familiar C-family build toolchain. So we will add Ryujinx as an "External Build System" project, with `dotnet`, our favorite external build system. 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 familiar C-family build toolchain. So we will add Ryujinx as an "External Build System" project, with `dotnet`, our favorite external build system.
@ -18,7 +18,7 @@ Xcode seems to be more willing to harness an application properly if it's nomina
7. Also in the Scheme editor, under Options, then "GPU Frame Capture", select "Metal" instead of "Automatically." 7. Also in the Scheme editor, under Options, then "GPU Frame Capture", select "Metal" instead of "Automatically."
8. At this point, Ryujinx should be building properly, and launching and harnessing properly within the Xcode debugger. However, we're not done yet! 8. At this point, Ryujinx should be building properly, and launching and harnessing properly within the Xcode debugger. However, we're not done yet!
### Build Debug MoltenVK ## Build Debug MoltenVK
We need a version of MoltenVK compiled with debug symbols. Luckily, building MoltenVK per its documentation is straightforward. Follow its build steps [here](https://github.com/KhronosGroup/MoltenVK/?tab=readme-ov-file#fetching-moltenvk-source-code), making sure you end up building in Debug mode. We need a version of MoltenVK compiled with debug symbols. Luckily, building MoltenVK per its documentation is straightforward. Follow its build steps [here](https://github.com/KhronosGroup/MoltenVK/?tab=readme-ov-file#fetching-moltenvk-source-code), making sure you end up building in Debug mode.
@ -27,7 +27,7 @@ We need a version of MoltenVK compiled with debug symbols. Luckily, building Mol
With debug MoltenVK in hand, replace the `libMoltenVK.dylib` binary in the `src/Ryujinx/bin/Debug/net8.0/` directory of your Ryujinx repository with the debug .dylib you just built. With debug MoltenVK in hand, replace the `libMoltenVK.dylib` binary in the `src/Ryujinx/bin/Debug/net8.0/` directory of your Ryujinx repository with the debug .dylib you just built.
### Miscellany ## Miscellany
You should now be able to produce frame captures stably within Xcode of Ryujinx titles. To save a capture as a shareable file, use the Export button in the Summary tab. A couple of other notes: You should now be able to produce frame captures stably within Xcode of Ryujinx titles. To save a capture as a shareable file, use the Export button in the Summary tab. A couple of other notes:
* You will need to tell lldb to ignore `SIGUSR1`; for whatever reason, this pops up everywhere once guest code is loaded. To do so within your current lldb debugger session, just enter ```pro hand -p true -s false SIGUSR1```. * You will need to tell lldb to ignore `SIGUSR1`; for whatever reason, this pops up everywhere once guest code is loaded. To do so within your current lldb debugger session, just enter ```pro hand -p true -s false SIGUSR1```.