浏览代码

Support 64-bit WebAssembly (#1491)

Thaddeus Crews 10 月之前
父节点
当前提交
361de9f327
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Jolt/Core/Core.h

+ 5 - 1
Jolt/Core/Core.h

@@ -195,7 +195,11 @@
 #elif defined(JPH_PLATFORM_WASM)
 	// WebAssembly CPU architecture
 	#define JPH_CPU_WASM
-	#define JPH_CPU_ADDRESS_BITS 32
+	#if defined(__wasm64__)
+		#define JPH_CPU_ADDRESS_BITS 64
+	#else
+		#define JPH_CPU_ADDRESS_BITS 32
+	#endif
 	#define JPH_VECTOR_ALIGNMENT 16
 	#define JPH_DVECTOR_ALIGNMENT 32
 	#ifdef __wasm_simd128__