From 253e801f5181fd009c3cde88f9dad78adea42f83 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Tue, 9 Feb 2016 18:24:12 +0100 Subject: [PATCH] linux: enable float operation on SSE unit Potentially faster and requires to flush denormal float to 0 --- cmake/BuildParameters.cmake | 4 +++- plugins/GSdx/CMakeLists.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 2fe05dd40a..ef9c9cde25 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -232,7 +232,9 @@ endif() #------------------------------------------------------------------------------- option(USE_LTO "Enable LTO optimization (will likely break the build)") -set(COMMON_FLAG "-pipe -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp") +# Note1: Builtin strcmp/memcmp was proved to be slower on Mesa than stdlib version. +# Note2: float operation SSE is impacted by the PCSX2 SSE configuration. In particular, flush to zero denormal. +set(COMMON_FLAG "-pipe -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp -mfpmath=sse") if (DISABLE_SVU) set(COMMON_FLAG "${COMMON_FLAG} -DDISABLE_SVU") endif() diff --git a/plugins/GSdx/CMakeLists.txt b/plugins/GSdx/CMakeLists.txt index cdda9e0459..92a3684f2f 100644 --- a/plugins/GSdx/CMakeLists.txt +++ b/plugins/GSdx/CMakeLists.txt @@ -11,7 +11,6 @@ set(Output GSdx-1.0.0) set(CommonFlags -fno-operator-names # because Xbyak uses and()/xor()/or()/not() function - -mfpmath=sse -fno-strict-aliasing -Wno-unknown-pragmas -Wno-parentheses