PhysX icon indicating copy to clipboard operation
PhysX copied to clipboard

macOS arm64 support and various other fixes

Open dpogue opened this issue 3 years ago • 7 comments
trafficstars

By default this will make a macOS universal build (with both x86_64 and arm64 in the same files) but supports per-architecture builds using the CMake PX_OUTPUT_ARCH flag.

dpogue avatar Jun 04 '22 18:06 dpogue

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: dpogue
:x: Lunanne
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jun 04 '22 18:06 CLAassistant

Thank you for your email, I will reply as soon as possible.我已经收到您的邮件,会尽快回复,谢谢!Leah Lynn林莹莹Computer Science and Technology, Zhejiang University浙江大学计算机科学与技术学院

MissUp109 avatar Jun 04 '22 18:06 MissUp109

Building this for ARM64/macOS and getting the following error:

/Users/colincornaby/Documents/Plasma/PlasmaSrc/vcpkg/buildtrees/physx/src/be49a99479-d1b16eed08.clean/physx/source/foundation/include/unix/neon/PsUnixNeonInlineAoS.h:3582:10: error: argument value 2 is outside the valid range [0, 1]
                return vdupq_lane_f32(vget_low_f32(a), index);

The code looks like this:

#if PX_UWP
	if(index == 0)
	{
		return vdupq_lane_f32(vget_low_f32(a), 0);
	}
	else if (index == 1)
	{
		return vdupq_lane_f32(vget_low_f32(a), 1);
	}
#else
	if(index < 2)
	{
		return vdupq_lane_f32(vget_low_f32(a), index);
	}
#endif

The issue could probably be resolved by opting in to the UWP behavior. I'm not sure what the source of this issue is - it should be happening for iOS as well. It could be that Apple has added this enforcement in a compiler update at some point.

colincornaby avatar Aug 25 '22 01:08 colincornaby

Thank you for your email, I will reply as soon as possible.我已经收到您的邮件,会尽快回复,谢谢!Leah Lynn林莹莹Computer Science and Technology, Zhejiang University浙江大学计算机科学与技术学院

MissUp109 avatar Aug 25 '22 01:08 MissUp109

I'm not sure what the source of this issue is - it should be happening for iOS as well. It could be that Apple has added this enforcement in a compiler update at some point.

I remember seeing this somewhere, but do not recall how I worked around it and why it didn't block submitting this patch (or the acceptance of this patch into other packaging systems) 😕

dpogue avatar Aug 25 '22 01:08 dpogue

This patch fixes compilation error.

rustui avatar Oct 02 '22 13:10 rustui

Thank you for your email, I will reply as soon as possible.我已经收到您的邮件,会尽快回复,谢谢!Leah Lynn林莹莹Computer Science and Technology, Zhejiang University浙江大学计算机科学与技术学院

MissUp109 avatar Oct 02 '22 13:10 MissUp109