Skip to content

Commit 254f69e

Browse files
committed
Disabled SIMD in MT version as Firefox doesn't seem to like it
1 parent ac3c905 commit 254f69e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This library comes in 5 flavours:
1717
- `wasm-compat` - A WASM version with the WASM file (encoded in base64) embedded in the bundle
1818
- `wasm` - A WASM version with a separate WASM file
1919
- `asm` - A JavaScript version that uses [asm.js](https://developer.mozilla.org/en-US/docs/Games/Tools/asm.js)
20-
- `wasm-compat-multithread` - Same as `wasm-compat` but with multi threading and SIMD enabled.
21-
- `wasm-multithread` - Same as `wasm` but with multi threading and SIMD enabled.
20+
- `wasm-compat-multithread` - Same as `wasm-compat` but with multi threading enabled.
21+
- `wasm-multithread` - Same as `wasm` but with multi threading enabled.
2222

2323
See [falling_shapes.html](Examples/falling_shapes.html) for a example on how to use the library.
2424

@@ -49,10 +49,10 @@ import Jolt from 'jolt-physics/wasm';
4949
// asm.js
5050
import Jolt from 'jolt-physics/asm';
5151

52-
// WASM embedded in the bundle, multithread and SIMD enabled
52+
// WASM embedded in the bundle, multithread enabled
5353
import Jolt from 'jolt-physics/wasm-compat-multithread';
5454

55-
// WASM, multithread and SIMD enabled
55+
// WASM, multithread enabled
5656
import Jolt from 'jolt-physics/wasm-multithread';
5757
```
5858

@@ -99,6 +99,7 @@ Additional options that can be provided to ```build.sh```:
9999

100100
* ```-DENABLE_MEMORY_PROFILER=ON``` will enable memory tracking to detect leaks.
101101
* ```-DDOUBLE_PRECISION=ON``` will enable the double precision mode. This allows worlds larger than a couple of km.
102+
* ```-DENABLE_SIMD=ON``` will enable SIMD instructions. Safari 16.4 was the last major browser to support this (in March 2023).
102103
* ```-DBUILD_WASM_COMPAT_ONLY=ON``` speeds up the build by only compiling the WASM compat version which the examples use.
103104

104105
## Running

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mkdir dist
1616
cmake -B Build/$BUILD_TYPE/ST -DCMAKE_BUILD_TYPE=$BUILD_TYPE "${@}"
1717
cmake --build Build/$BUILD_TYPE/ST -j`nproc`
1818

19-
cmake -B Build/$BUILD_TYPE/MT -DENABLE_MULTI_THREADING=ON -DENABLE_SIMD=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE "${@}"
19+
cmake -B Build/$BUILD_TYPE/MT -DENABLE_MULTI_THREADING=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE "${@}"
2020
cmake --build Build/$BUILD_TYPE/MT -j`nproc`
2121

2222
cat > ./dist/jolt-physics.d.ts << EOF

0 commit comments

Comments
 (0)