| @@ -7,6 +7,7 @@ | |||||
| #include <chrono> | #include <chrono> | ||||
| #include <thread> | #include <thread> | ||||
| #include <xmmintrin.h> | #include <xmmintrin.h> | ||||
| #include <pmmintrin.h> | |||||
| #include "engine.hpp" | #include "engine.hpp" | ||||
| #include "util.hpp" | #include "util.hpp" | ||||
| @@ -113,9 +114,10 @@ static void engineStep() { | |||||
| } | } | ||||
| static void engineRun() { | static void engineRun() { | ||||
| // Set CPU to denormals-are-zero mode | |||||
| // http://carlh.net/plugins/denormals.php | |||||
| // Set CPU to flush-to-zero (FTZ) and denormals-are-zero (DAZ) mode | |||||
| // https://software.intel.com/en-us/node/682949 | |||||
| _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | ||||
| _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); | |||||
| // Every time the engine waits and locks a mutex, it steps this many frames | // Every time the engine waits and locks a mutex, it steps this many frames | ||||
| const int mutexSteps = 64; | const int mutexSteps = 64; | ||||