From 7354465e12881e322630eff859fb38a292ee50f6 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sat, 6 Oct 2018 20:03:48 -0700 Subject: [PATCH] Add LOVR_USE_SSE; --- CMakeLists.txt | 2 ++ src/math/mat4.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 496a71a0..d192e50f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ option(LOVR_USE_OPENVR "Enable the OpenVR backend for the headset module" ON) option(LOVR_USE_WEBVR "Enable the WebVR backend for the headset module" OFF) option(LOVR_USE_OCULUS "Enable the LibOVR backend for the headset module (be sure to also set LOVR_OCULUS_PATH to point to the Oculus SDK)" OFF) option(LOVR_USE_FAKE_HEADSET "Enable the keyboard/mouse backend for the headset module" ON) +option(LOVR_USE_SSE "Enable SIMD use of intrinsics" ON) option(LOVR_SYSTEM_PHYSFS "Use the system-provided PhysFS" OFF) option(LOVR_SYSTEM_ASSIMP "Use the system-provided Assimp" OFF) @@ -58,6 +59,7 @@ if(EMSCRIPTEN) set(LOVR_USE_WEBVR ON) set(LOVR_USE_OPENVR OFF) set(LOVR_USE_OCULUS OFF) + set(LOVR_USE_SSE OFF) elseif(UNIX) if(APPLE) set(CMAKE_MACOSX_RPATH 1) diff --git a/src/math/mat4.c b/src/math/mat4.c index 6eac7b84..1f78190e 100644 --- a/src/math/mat4.c +++ b/src/math/mat4.c @@ -3,6 +3,9 @@ #include "math/vec3.h" #include #include +#ifdef LOVR_USE_SSE +#include +#endif // m0 m4 m8 m12 // m1 m5 m9 m13