Native Apple Silicon Support - Part 1 - #11364
Merged
Merged
Conversation
TellowKrinkle
approved these changes
Jun 13, 2024
TellowKrinkle
left a comment
Member
There was a problem hiding this comment.
Looks good, haven't tested
Comment on lines
+192
to
+201
| template <typename T> | ||
| static std::optional<T> sysctlbyname_T(const char* name) | ||
| { | ||
| T output = 0; | ||
| size_t output_size = sizeof(output); | ||
| if (sysctlbyname(name, &output, &output_size, nullptr, 0) != 0) | ||
| return std::nullopt; | ||
|
|
||
| return output; | ||
| } |
Member
There was a problem hiding this comment.
Might as well switch the systctlbyname_u32 stuff above to use this as well
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
This PR is the first part of adding native Apple Silicon support for PCSX2. I'm keeping the thread locked to prevent any shenanigans.
Apple CPUs will be the only supported architecture.
Windows support is there, so if one day I get my hands on a Snapdragon Elite device, we can look at adding support for it. But I don't really feel like spending $1,500 or whatever out of pocket again for a platform that could once again flop, since obviously I can't run Windows outside of a VM on my MacBook :-).
Linux-wise, PCSX2 will support running in a VM on MacOS, as well as bare metal on Asahi Linux. No other distributions of Linux will be supported.
Apple Silicon support is still incomplete. There are no EE/VU/IOP recompilers yet.
I am not promising any date for the completion of them. Do not hassle me or any of the other team members.
The "current" version I have is quite... messy, and duplicates a ton of code. Such duplication all has to be moved out to common code first, before it can be merged. I'm PR'ing all the non-duplicate code first, so that we can make sure x86 doesn't regress, and work on optimizing the scanline JIT, which I have spent some time on, but it's definitely not optimal yet.
Rationale behind Changes
2-3x performance improvement depending on the game on Apple Silicon once the EE/VU/IOP recs are added. Honestly, Rosetta is very impressive, but that's still enough of a performance hit to make games like GoW2 drop below full speed at times.
Suggested Testing Steps
Make sure x86 performance is unaffected. Someone will need to test "real" Intel MacOS, I don't trust Rosetta for this.