[Bullet3] Remove platform restrictions (#23673)

* bullet3: Add patch for windows-arm64

* bullet3: Add patch for uwp

* Bullet: Remove platform restrictions

Bullet claims to support all platforms. ARM works on android and UWP seems to be taken into consideration.
Vcpkg's restrictions are historical and seem to date back to when the CI was unable to properly test all platforms.
This commit is contained in:
Sandy 2022-03-21 17:07:49 -04:00 committed by GitHub
parent 867df2ac44
commit 67f79d8799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 64 additions and 4 deletions

View File

@ -6,7 +6,10 @@ vcpkg_from_github(
REF 3.17
SHA512 a5105bf5f1dd365a64a350755c7d2c97942f74897a18dcdb3651e6732fd55cc1030a096f5808cf50575281f05e3ac09aa50a48d271a47b94cd61f5167a72b7cc
HEAD_REF master
PATCHES cmake-fix.patch
PATCHES
cmake-fix.patch
windows-arm64-sse-fix.patch
uwp-deltav-fix.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -0,0 +1,26 @@
From 35264f81bb63c4d4e5cf195e3b9db7ea6b761396 Mon Sep 17 00:00:00 2001
From: Sandy Carter <bwrsandman@gmail.com>
Date: Sun, 20 Mar 2022 15:46:58 -0400
Subject: [PATCH] UWP: Fix potentially uninitialized local pointer variable
error
---
src/BulletSoftBody/btSoftBody.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/BulletSoftBody/btSoftBody.cpp b/src/BulletSoftBody/btSoftBody.cpp
index 933f3edc5..e91c1b9a4 100644
--- a/src/BulletSoftBody/btSoftBody.cpp
+++ b/src/BulletSoftBody/btSoftBody.cpp
@@ -3897,7 +3897,7 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
btVector3 va(0, 0, 0);
btRigidBody* rigidCol = 0;
btMultiBodyLinkCollider* multibodyLinkCol = 0;
- btScalar* deltaV;
+ btScalar* deltaV = NULL;
if (cti.m_colObj->getInternalType() == btCollisionObject::CO_RIGID_BODY)
{
--
2.35.1

View File

@ -1,10 +1,9 @@
{
"name": "bullet3",
"version": "3.17",
"port-version": 4,
"port-version": 5,
"description": "Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library",
"homepage": "https://github.com/bulletphysics/bullet3",
"supports": "osx | !(arm | uwp)",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@ -0,0 +1,27 @@
From e4414c80232d66f8a250aa83f934594bcba3c605 Mon Sep 17 00:00:00 2001
From: Sandy <bwrsandman@gmail.com>
Date: Sun, 20 Mar 2022 15:41:07 -0400
Subject: [PATCH] Fix compile on windows 64 bit arm architecture
When building 64 bit arm with visual studio, btScalar will try to include SSE headers meant for x86 and x64 architectures.
This gives the following error in many source files:
```
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\emmintrin.h(20): fatal error C1189: #error: This header is specific to X86 and X64 targets
```
---
src/LinearMath/btScalar.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h
index 28c03b2868..e47baadd6b 100644
--- a/src/LinearMath/btScalar.h
+++ b/src/LinearMath/btScalar.h
@@ -107,7 +107,7 @@ inline int btIsDoublePrecision()
#define btFsel(a,b,c) __fsel((a),(b),(c))
#else
-#if defined (_M_ARM)
+#if defined (_M_ARM) || defined (_M_ARM64)
//Do not turn SSE on for ARM (may want to turn on BT_USE_NEON however)
#elif (defined (_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined (BT_USE_DOUBLE_PRECISION))

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f526f9d9698251590883fcc52ac8bf0f7ef9c5a4",
"version": "3.17",
"port-version": 5
},
{
"git-tree": "d986cc96144fa3de5201d56a508f348db9b66e71",
"version": "3.17",

View File

@ -1174,7 +1174,7 @@
},
"bullet3": {
"baseline": "3.17",
"port-version": 4
"port-version": 5
},
"bustache": {
"baseline": "1.1.0",