-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-mfpmath=sse
is not supported by Emscripten
#1173
Comments
Sorry about that. I get an error on all the other instruction set flags too, so I opted to bypass the entire code block. |
Awesome! Thank you! |
I'm a bit confused by this. Shouldn't Jolt be adding the Clearly I'm also curious about the specific mention of Line 623 in 6e0b867
Was SSE 4.2 just brought up as an example, or is there some limitation with Jolt and Emscripten that prevents targeting SSE2? (I realize SSE 4.2 has pretty much 100% coverage these days, but Godot is still hanging on to SSE2 for now.) EDIT: I see now that the browser coverage isn't great for WebAssembly SIMD in general, but that's beside the point I guess. |
Yes it should. I've just submitted a change that adds a cmake option
Emscripten just translates the SSE/AVX instructions to WASM SIMD instructions. The reason why I didn't pick AVX is that Jolt uses 256 bit SIMD instructions when AVX is enabled, which is not supported by emscripten. I picked the next highest which is SSE 4.2. I don't think it matters which SSE version you pick as it all gets converted to WASM instructions and the browser is responsible for translating them to native (SSE / NEON) instructions based on the CPU architecture. It may be that rewriting Jolt to use the WASM intrinsics gives better performance, but having the SSE instructions automatically convert to WASM instructions was a lot less work. |
Great, thank you! Now there's just the dilemma of whether to actually enable it or not I guess. 😅
I'm a bit surprised that the minimum hardware requirements for WASM SIMD isn't explicitly mentioned anywhere for any of the major browsers (that I could find at least). I had to dig through the V8 source code to find that it's SSE4.1 for Chromium-based browsers. The one SSE4.2 intrinsic that's mappable to WASM SIMD ( |
Hi!
The change in this commit to enable sse with 32 bit builds seems to have broken building with Emscripten:
godot-jolt@ebccdcb
It throws:
error: unknown FP unit 'sse'
I'm not sure if this is the correct path, but I can workaround by excluding it like this:
Perhaps there is a better way? I could file a PR to make this change, if you like.
The text was updated successfully, but these errors were encountered: