1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
From bfee256dd1e620194b5a5ffe4b7873d7e8832ae9 Mon Sep 17 00:00:00 2001
From: Jonas Karlsson <jonas.karlsson@qt.io>
Date: Fri, 20 May 2022 16:57:16 +0200
Subject: [PATCH] Various fixes for passing CI
- Move code into Qt namespace
- Support all integer types in hash method
- Remove compile time checks for pack validation
- Disable SIMD on mips, arm and wasm
- Remove CmMathUtils from build
- Add more platforms to serialization
- Add empty PxLoadPhysxGPUModule method for unsupported architectures
- Disable physicsscene test
Change-Id: Ie78b1dc716a46dc0e60a40dc72891db8bfc1db9a
---
.../include/foundation/PxPreprocessor.h | 36 ++++---------------
.../PhysX/source/foundation/include/PsHash.h | 18 +++++-----
.../physx/src/gpu/PxPhysXGpuModuleLoader.cpp | 5 +++
.../src/serialization/SnSerialUtils.cpp | 12 +++++--
4 files changed, 29 insertions(+), 42 deletions(-)
diff --git a/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h b/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h
index 3aea54e..14ed950 100644
--- a/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h
+++ b/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h
@@ -125,6 +125,8 @@ Architecture defines, see http://sourceforge.net/p/predef/wiki/Architectures/
#define PX_ARM 1
#elif defined(__ppc__) || defined(_M_PPC) || defined(__CELLOS_LV2__)
#define PX_PPC 1
+#elif defined(__mips__)
+#define PX_X64 1
#else
#error "Unknown architecture"
#endif
@@ -144,6 +146,11 @@ SIMD defines
#endif
#endif
+/** Disable SIMD for webassembly, mips and arm64 */
+#if defined(__EMSCRIPTEN__) || defined(__mips__) || defined(_M_ARM64) || defined(_M_ARM)
+#define PX_SIMD_DISABLED 1
+#endif
+
/**
define anything not defined on this platform to 0
*/
@@ -467,35 +474,6 @@ PX_CUDA_CALLABLE PX_INLINE void PX_UNUSED(T const&)
{
}
-// Ensure that the application hasn't tweaked the pack value to less than 8, which would break
-// matching between the API headers and the binaries
-// This assert works on win32/win64, but may need further specialization on other platforms.
-// Some GCC compilers need the compiler flag -malign-double to be set.
-// Apparently the apple-clang-llvm compiler doesn't support malign-double.
-#if PX_PS4 || PX_APPLE_FAMILY || (PX_CLANG && !PX_ARM)
-struct PxPackValidation
-{
- char _;
- long a;
-};
-#elif PX_ANDROID || (PX_CLANG && PX_ARM)
-struct PxPackValidation
-{
- char _;
- double a;
-};
-#else
-struct PxPackValidation
-{
- char _;
- long long a;
-};
-#endif
-// clang (as of version 3.9) cannot align doubles on 8 byte boundary when compiling for Intel 32 bit target
-#if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN && !(PX_CLANG && PX_X86)
-PX_COMPILE_TIME_ASSERT(PX_OFFSET_OF(PxPackValidation, a) == 8);
-#endif
-
// use in a cpp file to suppress LNK4221
#if PX_VC
#define PX_DUMMY_SYMBOL \
diff --git a/src/3rdparty/PhysX/source/foundation/include/PsHash.h b/src/3rdparty/PhysX/source/foundation/include/PsHash.h
index a0fe56b..b5f8a33 100644
--- a/src/3rdparty/PhysX/source/foundation/include/PsHash.h
+++ b/src/3rdparty/PhysX/source/foundation/include/PsHash.h
@@ -73,7 +73,7 @@ PX_FORCE_INLINE uint32_t hash(const int32_t key)
// Thomas Wang's 64 bit mix
// http://www.cris.com/~Ttwang/tech/inthash.htm
-PX_FORCE_INLINE uint32_t hash(const uint64_t key)
+PX_FORCE_INLINE uint32_t hash(const unsigned long key)
{
uint64_t k = key;
k += ~(k << 32);
@@ -87,17 +87,15 @@ PX_FORCE_INLINE uint32_t hash(const uint64_t key)
return uint32_t(UINT32_MAX & k);
}
-#if PX_APPLE_FAMILY
-// hash for size_t, to make gcc happy
-PX_INLINE uint32_t hash(const size_t key)
+PX_FORCE_INLINE uint32_t hash(const unsigned long long key)
{
-#if PX_P64_FAMILY
- return hash(uint64_t(key));
-#else
- return hash(uint32_t(key));
-#endif
+ return hash(uint64_t(key));
+}
+
+PX_FORCE_INLINE uint32_t hash(const int64_t key)
+{
+ return hash(uint64_t(key));
}
-#endif
// Hash function for pointers
PX_INLINE uint32_t hash(const void* ptr)
diff --git a/src/3rdparty/PhysX/source/physx/src/gpu/PxPhysXGpuModuleLoader.cpp b/src/3rdparty/PhysX/source/physx/src/gpu/PxPhysXGpuModuleLoader.cpp
index 94105ef..d74f7ae 100644
--- a/src/3rdparty/PhysX/source/physx/src/gpu/PxPhysXGpuModuleLoader.cpp
+++ b/src/3rdparty/PhysX/source/physx/src/gpu/PxPhysXGpuModuleLoader.cpp
@@ -175,6 +175,11 @@ namespace physx
}
}
+#else
+ void PxLoadPhysxGPUModule(const char*)
+ {
+ Ps::getFoundation().error(PxErrorCode::eINTERNAL_ERROR, __FILE__, __LINE__, "GPU module disabled");
+ }
#endif // PX_LINUX
} // end physx namespace
diff --git a/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp b/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp
index 20b0102..aa53797 100644
--- a/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp
+++ b/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp
@@ -39,7 +39,7 @@ using namespace physx;
namespace
{
-#define SN_NUM_BINARY_PLATFORMS 17
+#define SN_NUM_BINARY_PLATFORMS 19
const PxU32 sBinaryPlatformTags[SN_NUM_BINARY_PLATFORMS] =
{
PX_MAKE_FOURCC('W','_','3','2'),
@@ -58,6 +58,8 @@ const PxU32 sBinaryPlatformTags[SN_NUM_BINARY_PLATFORMS] =
PX_MAKE_FOURCC('L','A','6','4'),
PX_MAKE_FOURCC('W','A','3','2'),
PX_MAKE_FOURCC('W','A','6','4'),
+ PX_MAKE_FOURCC('L','A','3','2'),
+ PX_MAKE_FOURCC('U','N','K','_'),
};
const char* sBinaryPlatformNames[SN_NUM_BINARY_PLATFORMS] =
@@ -78,7 +80,9 @@ const char* sBinaryPlatformNames[SN_NUM_BINARY_PLATFORMS] =
"linuxaarch64",
"uwparm",
"uwparm64",
- "macarm"
+ "macarm",
+ "linuxarm",
+ "unknown",
};
}
@@ -121,8 +125,10 @@ PxU32 getBinaryPlatformTag()
return sBinaryPlatformTags[15];
#elif PX_OSX && PX_A64
return sBinaryPlatformTags[16];
+#elif PX_LINUX && PX_ARM
+ return sBinaryPlatformTags[17];
#else
- #error Unknown binary platform
+ return sBinaryPlatformTags[18];
#endif
}
--
2.36.1
|