Browse Source

Support 64-bit WebAssembly (#1491)

Thaddeus Crews 6 months ago
parent
commit
361de9f327
1 changed files with 5 additions and 1 deletions
  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__