NVIDIAGameWorks / PhysX-3.4

NVIDIA PhysX SDK 3.4
https://www.nvidia.com/
2.35k stars 274 forks source link

Android Compile Error #45

Closed GregSlazinski closed 5 years ago

GregSlazinski commented 6 years ago

https://github.com/NVIDIAGameWorks/PhysX-3.4/blob/c7a921796332e8fcd51f3e05c1a318a41282e1e2/PhysX_3.4/Source/LowLevelCloth/src/neon/NeonSolverKernel.cpp#L43

Hi,

I'm getting an compilation error for Android:

PhysX/Source/LowLevelCloth/src/neon/NeonSolverKernel.cpp:43:55: error: unknown type name 'PxProfileZone'; did you mean 'profile::PxProfileZone'?
                      IterationStateFactory& factory, PxProfileZone* profileZone)
                                                      ^~~~~~~~~~~~~
                                                      profile::PxProfileZone
../PhysX/Source/LowLevelCloth/include\Factory.h:44:7: note: 'profile::PxProfileZone' declared here
class PxProfileZone;

I think this should be profile::PxProfileZone instead of PxProfileZone ?

However even after the fix, the file won't compile. I'm trying to use my own compilation toolchain without having to use cygwin.

////////////////////////////////////

Also another problem: NeonCollision.cpp NeonSelfCollision.cpp NeonSolverKernel.cpp Use __ARM_NEON__ which fails to compile on Android Arm64 __ARM_NEON should be used instead. See here: https://github.com/magnumripper/JohnTheRipper/issues/1998

You already test for it in PxPreprocessor.h:

#if defined(_M_ARM) || defined(__ARM_NEON__) || defined(__ARM_NEON)
#define PX_NEON 1

so perhaps the header should be included and PX_NEON tested instead?

AlesBorovicka commented 6 years ago

Hi, We do not built and test internally the Arm64, but some of our customers do and they seems to not report these issues. I am not sure we will extend the Arm64 build for 3.4. But those changes above seem ok to take. What toolchain did you used for the compilation please?

GregSlazinski commented 6 years ago

I've uploaded the files here #48 It's configured to build for Arm32/64 I would strongly recommend testing the source for Arm64 as the industry is shifting (already shifted) towards 64-bit. Major flagship Android phones already support 64-bit since last few iterations, while latest version of iOS already dropped support for 32-bits altogether, and is 64-bit only.

AlesBorovicka commented 5 years ago

We should support custom android builds in 4.0. The default target should be armeabi-v7a with NEON.