-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SSE: Check !defined(__EMSCRIPTEN__)
where intrinsics are unavailable on WASM
#12917
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -442,10 +442,16 @@ void SoundDeviceNetwork::callbackProcessClkRef() { | |
|
||
if (!m_denormals) { | ||
m_denormals = true; | ||
|
||
// This disables the denormals calculations, to avoid a | ||
// performance penalty of ~20 | ||
// https://github.com/mixxxdj/mixxx/issues/7747 | ||
#ifdef __SSE__ | ||
|
||
// On Emscripten (WebAssembly) denormals-as-zero/flush-as-zero is not | ||
// configurable, for discussion and links see | ||
// https://github.com/mixxxdj/mixxx/pull/12917 | ||
|
||
#if defined(__SSE__) && !defined(__EMSCRIPTEN__) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here are some details: It sounds like denormals to zero mode IS available. Can you check that and adjust the debug message accordingly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it's available but since the denormals mode is fixed, we cannot use the set functions, so there is not really a point in having these blocks execute. The flush zero mode is fixed too, but in this case to being off, which isn't the mode we want.
Do mean emitting a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, than just add a comment about the situation. My original concern was that this is a implementation defined thing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haven't gotten around to test EQ and filters in Mixxx yet (there are still some more foundational issues to be resolved, including audio support, before we can actually test that), but came across this interesting discussion upstream: WebAssembly/design#148 Looks like flush-to-zero (FTZ)/denormals-as-zero (DAZ) were deliberately avoided in favor of IEEE-compliance, though they've hinted at adding it as an opt-in. Edit: Mentioned here: https://github.com/WebAssembly/design/blob/main/FutureFeatures.md#flushing-subnormal-values-to-zero |
||
if (!_MM_GET_DENORMALS_ZERO_MODE()) { | ||
qDebug() << "SSE: Enabling denormals to zero mode"; | ||
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add here a comment about the current situation. Do we suffer from denormals calculations or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably say that these are not supported, but to assess the actual performance, we'd need probably need audio, which isn't ready yet. Since it's not configurable, there is probably not much point in discussing this as a performance consideration until Emscripten/Wasm add a way to configure it.