[Feature Request] #6978-JIT-Sparse-function-table from test build fork #39

Closed
opened 2024-10-22 21:08:30 +00:00 by Maskworkr · 12 comments
Maskworkr commented 2024-10-22 21:08:30 +00:00 (Migrated from github.com)

Overview

Someone more able than me who could look up to this branch fork https://github.com/Ryujinx-NX/Ryujinx/tree/%236978-JIT-Sparse-function-table from peri peri work, could be a huge boost into performance since it was never merged due to no reviews, i guess its big work for someone else that could do, im leaving this here for the preminent future

Smaller details

build test: https://www.youtube.com/watch?v=zY8nP1iu5ls

Nature of request

hoping this could be helpful for someone that actually contributes

Why would this feature be useful?

Performance upgrade

### Overview Someone more able than me who could look up to this branch fork https://github.com/Ryujinx-NX/Ryujinx/tree/%236978-JIT-Sparse-function-table from peri peri work, could be a huge boost into performance since it was never merged due to no reviews, i guess its big work for someone else that could do, im leaving this here for the preminent future ### Smaller details build test: https://www.youtube.com/watch?v=zY8nP1iu5ls ### Nature of request hoping this could be helpful for someone that actually contributes ### Why would this feature be useful? Performance upgrade
extherian commented 2024-10-26 12:41:15 +00:00 (Migrated from github.com)

I am trying to compile this branch for testing, but using git to clone branches of projects is a pain, I tried to run git clone https://github.com/Ryujinx-NX/Ryujinx/tree/%236978-JIT-Sparse-function-table but it just tells me repository not found. Has anyone else actually successfully compiled this version? Or at least could tell me what command to run to clone this specific branch and not the Ryujinx-NX master?

I am trying to compile this branch for testing, but using git to clone branches of projects is a pain, I tried to run git clone https://github.com/Ryujinx-NX/Ryujinx/tree/%236978-JIT-Sparse-function-table but it just tells me repository not found. Has anyone else actually successfully compiled this version? Or at least could tell me what command to run to clone this specific branch and not the Ryujinx-NX master?
GreemDev commented 2024-10-26 12:42:59 +00:00 (Migrated from github.com)

You're supposed to clone the repository, and checkout branches or commits, not directly clone branches

You're supposed to clone the repository, and checkout branches or commits, not directly clone branches
extherian commented 2024-10-26 12:53:17 +00:00 (Migrated from github.com)

Thanks Greem, I compiled it successfully, now to test it.

Thanks Greem, I compiled it successfully, now to test it.
extherian commented 2024-10-26 13:06:25 +00:00 (Migrated from github.com)

Here is a link to the build I compiled in case anyone else wants to test it, hopefully I didn't end up compiling a slow debug build or something like that https://drive.google.com/file/d/1cKXW0JKLZSqt3rQjF20k_g0FFQ38NYL7/view?usp=sharing

Here is a link to the build I compiled in case anyone else wants to test it, hopefully I didn't end up compiling a slow debug build or something like that https://drive.google.com/file/d/1cKXW0JKLZSqt3rQjF20k_g0FFQ38NYL7/view?usp=sharing
Maskworkr commented 2024-10-26 15:37:28 +00:00 (Migrated from github.com)

Here is a link to the build I compiled in case anyone else wants to test it, hopefully I didn't end up compiling a slow debug build or something like that https://drive.google.com/file/d/1cKXW0JKLZSqt3rQjF20k_g0FFQ38NYL7/view?usp=sharing

imagen_2024-10-26_113715690
wont let me download it because of said virus

> Here is a link to the build I compiled in case anyone else wants to test it, hopefully I didn't end up compiling a slow debug build or something like that https://drive.google.com/file/d/1cKXW0JKLZSqt3rQjF20k_g0FFQ38NYL7/view?usp=sharing ![imagen_2024-10-26_113715690](https://github.com/user-attachments/assets/b95dd75f-c549-4b7d-90b6-a33f5f32c6b6) wont let me download it because of said virus
extherian commented 2024-10-26 19:40:55 +00:00 (Migrated from github.com)

Use a different browser like Firefox, for some reason my builds are being flagged as malware when they're not.

Anyway, I compiled three different builds for testing, pick whichever one suits your use case. Note that since these are Google Drive links, you will have to sign in with a Google account before you can download them.

Click here for the AppImage build for Steam Deck.

Click here for the Windows build for PC.

Click here for the Linux build for PC.

Use a different browser like Firefox, for some reason my builds are being flagged as malware when they're not. Anyway, I compiled three different builds for testing, pick whichever one suits your use case. Note that since these are Google Drive links, you will have to sign in with a Google account before you can download them. [Click here for the AppImage build for Steam Deck. ](https://drive.google.com/file/d/1X81i8HRV-rxFoG7LWZ-lTf-T28bAWCUF/view?usp=sharing) [Click here for the Windows build for PC.](https://drive.google.com/file/d/1cKXW0JKLZSqt3rQjF20k_g0FFQ38NYL7/view?usp=sharing) [Click here for the Linux build for PC.](https://drive.google.com/file/d/10QqRU9VzlKZB7MJD7x2BGUFnmLmrZ4yL/view?usp=sharing)
extherian commented 2024-10-27 10:53:39 +00:00 (Migrated from github.com)

OK, here is my own personal regression test with a game I know to be prone to crashing: Xenoblade Chronicles 2. There is a feature called the Events Theater, which allows users to rewatch cutscenes that they already saw playing through the game. One of these cutscenes, "After Bana!", in Chapter 4: Aegis, reliably causes the game to crash every time it is run on yuzu, unless CPU Accuracy is set to Paranoid (disables most optimisations). Notably, these same cutscene, when run from the Events Theater in Greem's Ryujinx, will never cause a crash, even when the Memory Manager Mode is set to Host Unchecked (fastest, unsafe). Nor does this issue occur in the Sparse JIT build, indicating that at least for this title, the performance benefits of using a sparse jit table do not come at the cost of accurate CPU recompilation.

OK, here is my own personal regression test with a game I know to be prone to crashing: Xenoblade Chronicles 2. There is a feature called the Events Theater, which allows users to rewatch cutscenes that they already saw playing through the game. One of these cutscenes, "After Bana!", in Chapter 4: Aegis, reliably causes the game to crash every time it is run on yuzu, unless CPU Accuracy is set to Paranoid (disables most optimisations). Notably, these same cutscene, when run from the Events Theater in Greem's Ryujinx, will never cause a crash, even when the Memory Manager Mode is set to Host Unchecked (fastest, unsafe). Nor does this issue occur in the Sparse JIT build, indicating that at least for this title, the performance benefits of using a sparse jit table do not come at the cost of accurate CPU recompilation.
extherian commented 2024-10-27 11:02:07 +00:00 (Migrated from github.com)

By the way, I would also like to advise people to delete the PPTC cache for any games they plan on testing if they are using the same user folder as for Greem's build, it is possible that PPTC caches for the Greem build may not be fully compatible with the Sparse JIT build, so right click on the game you want to test, go to "Cache Management", "Open PPTC Directory", and delete all files and folders you find in the window that is opened.

By the way, I would also like to advise people to delete the PPTC cache for any games they plan on testing if they are using the same user folder as for Greem's build, it is possible that PPTC caches for the Greem build may not be fully compatible with the Sparse JIT build, so right click on the game you want to test, go to "Cache Management", "Open PPTC Directory", and delete all files and folders you find in the window that is opened.
GreemDev commented 2024-10-27 11:25:16 +00:00 (Migrated from github.com)

By the way, I would also like to advise people to delete the PPTC cache for any games they plan on testing if they are using the same user folder as for Greem's build, it is possible that PPTC caches for the Greem build may not be fully compatible with the Sparse JIT build, so right click on the game you want to test, go to "Cache Management", "Open PPTC Directory", and delete all files and folders you find in the window that is opened.

Seems like they aren't compatible, the JIT Sparse changes change a version constant in Ptc.cs

> By the way, I would also like to advise people to delete the PPTC cache for any games they plan on testing if they are using the same user folder as for Greem's build, it is possible that PPTC caches for the Greem build may not be fully compatible with the Sparse JIT build, so right click on the game you want to test, go to "Cache Management", "Open PPTC Directory", and delete all files and folders you find in the window that is opened. Seems like they aren't compatible, the JIT Sparse changes [change a version constant in Ptc.cs](https://github.com/Ryujinx-NX/Ryujinx/commit/f950812b9fecc1d482a93599e45bde6433294131)
extherian commented 2024-10-27 12:12:29 +00:00 (Migrated from github.com)

Yes, it's likely that if this were to be merged upstream, people would have to delete their existing PPTC cache. Anyway, for the time being, I am switching to using the Sparse JIT build for playing through the three xenoblade games, I will report back if I can isolate any accuracy regressions to the Sparse JIT changes.

Yes, it's likely that if this were to be merged upstream, people would have to delete their existing PPTC cache. Anyway, for the time being, I am switching to using the Sparse JIT build for playing through the three xenoblade games, I will report back if I can isolate any accuracy regressions to the Sparse JIT changes.
extherian commented 2024-10-27 19:34:45 +00:00 (Migrated from github.com)

New build from Greem, merging the Sparse JIT functions into this fork:

For Windows users
For macOS users
For Linux PC users
For Linux ARM users

Please use these instead of my links in the post above.

New build from Greem, merging the Sparse JIT functions into this fork: [For Windows users](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2109577808.zip) [For macOS users](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2109575673.zip) [For Linux PC users](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2109573771.zip) [For Linux ARM users](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2109572210.zip) Please use these instead of my links in the post above.
GreemDev commented 2024-10-27 21:39:11 +00:00 (Migrated from github.com)

Closing this issue as this is now an open PR. Please go there for testing discussion

Closing this issue as [this is now an open PR](https://github.com/GreemDev/Ryujinx/pull/83). Please go there for testing discussion
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MeloNX/Ryujinx-ryubing#39
No description provided.