This issue dates back to Minie v0.7.2, when a workaround was implemented that discards serialized BVH data if the writer and reader were on different platforms.
The root cause is in Bullet's btQuantizedBvh.h, where the size of class btQuantizedBvh varies between platforms.
On Linux platforms (GCC compiler, both on x86_64 and arm64), the following assertions pass:
#ifdef BT_USE_DOUBLE_PRECISION
btAssert(sizeof(btQuantizedBvh) == 296);
#else
btAssert(sizeof(btQuantizedBvh) == 248);
#endif
On macOS (LLVM compiler) and Windows (Visual compiler) the same assertions often fail. Inferred from bvh.serialize() return values:
- 64-bit Windows: 256 bytes in Sp, 304 bytes in Dp
- MacOS with Arm CPU: 256 bytes in Sp, 296 bytes in Dp
Perhaps some padding is needed for data portability.
This issue dates back to Minie v0.7.2, when a workaround was implemented that discards serialized BVH data if the writer and reader were on different platforms.
The root cause is in Bullet's btQuantizedBvh.h, where the size of
class btQuantizedBvhvaries between platforms.On Linux platforms (GCC compiler, both on x86_64 and arm64), the following assertions pass:
On macOS (LLVM compiler) and Windows (Visual compiler) the same assertions often fail. Inferred from
bvh.serialize()return values:Perhaps some padding is needed for data portability.