Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile PhysX natively for Apple Silicon (M1) #472

Open
niklas-ourmachinery opened this issue Sep 14, 2021 · 6 comments
Open

Compile PhysX natively for Apple Silicon (M1) #472

niklas-ourmachinery opened this issue Sep 14, 2021 · 6 comments

Comments

@niklas-ourmachinery
Copy link

Are there plans for supporting native compiles of PhysX on Apple Silicon (M1)?

Seems like in theory it shouldn't be too cumbersome, since there is already a linux-aarch64 configuration as well as an ios one, but it might involve some fiddling with the settings.

@niklas-ourmachinery
Copy link
Author

I made some a quick hack to get it to compile (if anybody else is looking for this):

9fb98ab

(Note: This doesn't do things properly, it doesn't preserve the "x86_64" OS X build for example, does not create a new binary platform tag, adds PX_ARM to the list of 64-bit platforms, etc, etc. It's just a super quick hack to get things to compile.)

@awkr
Copy link

awkr commented Oct 20, 2021

thanks bro, can work on my m1.

@colincornaby
Copy link

Has this version been working well for people? Definitely not trying to put @niklas-ourmachinery on the spot, he just advertised it as a hack to get it compiling! But I'm having a few weird issues with collision detection that I'm not seeing on Intel. I'm trying to narrow it down specifically to PhysX and not some other weird side effect in the application. But so far everything points to PhysX just not handling some collisions on Apple Silicon.

@colincornaby
Copy link

I went through the Physx SDK changes for Apple Silicon and found that some NEON optimizations were being built only for iOS. I carefully went through and added OSX defines alongside those iOS defines and so far the collision issues were fixed. I'll see if I can post something later.

Would certainly be easier if there was an official update for Apple Silicon though.

@niklas-ourmachinery
Copy link
Author

Oh great! Yes, I never tested this much so not surprising there are issues.

@dpogue
Copy link

dpogue commented Jun 4, 2022

I think I've sorted out the M1 issues (and also the CMake build stuff), and put up a PR here: #569

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants