From 53642d3cc406b336ea6c81058ae8185685cad00a Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 17 Jun 2014 14:23:16 +1000 Subject: [PATCH] Qt: Optimisations for ARM desktop/tablet hosts. --- Qt/Native.pro | 12 +++--------- Qt/PPSSPP.pro | 2 +- Qt/Settings.pri | 17 +++++++++++++---- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Qt/Native.pro b/Qt/Native.pro index e15a7ce4cb..16e67f50e9 100644 --- a/Qt/Native.pro +++ b/Qt/Native.pro @@ -92,8 +92,7 @@ SOURCES += $$P/native/audio/*.cpp \ $$P/native/math/expression_parser.cpp \ $$P/native/math/math_util.cpp \ $$P/native/math/lin/*.cpp \ - $$P/native/math/fast/fast_math.c \ - $$P/native/math/fast/fast_matrix.c \ + $$P/native/math/fast/*.c \ $$P/native/net/*.cpp \ $$P/native/profiler/profiler.cpp \ $$P/native/thread/*.cpp \ @@ -104,12 +103,7 @@ SOURCES += $$P/native/audio/*.cpp \ $$P/native/util/text/utf8.cpp \ $$P/native/util/text/parsers.cpp -!arm { - SOURCES += $$files($$P/native/math/fast/fast_matrix_sse.c) -} -armv7 { - SOURCES += $$files($$P/native/math/fast/fast_matrix_neon.S) -} +armv7: SOURCES += $$files($$P/native/math/fast/fast_matrix_neon.S) HEADERS += $$P/native/audio/*.h \ @@ -137,6 +131,7 @@ HEADERS += $$P/native/audio/*.h \ $$P/native/input/*.h \ $$P/native/math/*.h \ $$P/native/math/lin/*.h \ + $$P/native/math/fast/*.h \ $$P/native/net/*.h \ $$P/native/profiler/profiler.h \ $$P/native/thread/*.h \ @@ -148,4 +143,3 @@ HEADERS += $$P/native/audio/*.h \ $$P/native/util/text/parsers.h INCLUDEPATH += $$P/native - diff --git a/Qt/PPSSPP.pro b/Qt/PPSSPP.pro index 67f7ec8172..a08ecf9beb 100644 --- a/Qt/PPSSPP.pro +++ b/Qt/PPSSPP.pro @@ -77,7 +77,7 @@ linux:!android: LIBS += -ldl -lrt -lz macx: LIBS += -liconv qnx: LIBS += -lscreen symbian: LIBS += -lremconcoreapi -lremconinterfacebase -android: LIBS += -lEGL +linux:arm|android: LIBS += -lEGL unix:contains(QT_CONFIG, system-zlib) { LIBS += -lz } diff --git a/Qt/Settings.pri b/Qt/Settings.pri index 1e51a5762c..0c74250e47 100644 --- a/Qt/Settings.pri +++ b/Qt/Settings.pri @@ -30,7 +30,10 @@ win32-msvc* { QMAKE_CXXFLAGS += -ffast-math -fno-strict-aliasing greaterThan(QT_MAJOR_VERSION,4): CONFIG+=c++11 else: QMAKE_CXXFLAGS += -std=c++11 - QMAKE_CXXFLAGS += -O3 + QMAKE_CFLAGS_RELEASE ~= s/-O.*/ + QMAKE_CXXFLAGS_RELEASE ~= s/-O.*/ + QMAKE_CFLAGS_RELEASE += -O3 + QMAKE_CXXFLAGS_RELEASE += -O3 } # Arch specific xarch = $$find(QT_ARCH, "86") @@ -42,15 +45,21 @@ macx|contains(QT_ARCH, windows)|count(xarch, 1) { } arm:!symbian { CONFIG += armv7 - QMAKE_CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp - QMAKE_CXXFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp + QMAKE_CFLAGS_RELEASE ~= s/-mfpu.*/ + QMAKE_CFLAGS_DEBUG ~= s/-mfpu.*/ + QMAKE_CFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math + QMAKE_CFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math + QMAKE_CXXFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math + QMAKE_CXXFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math } gleslib = $$find(QT_CONFIG, "opengles") count(gleslib,0) { # OpenGL INCLUDEPATH += $$P/native/ext/glew } else { - DEFINES += USING_GLES2 MOBILE_DEVICE + DEFINES += USING_GLES2 + // Lets hardcode this. How else do we know if the environment prefers windows? + !linux|android|maemo: DEFINES += MOBILE_DEVICE CONFIG += mobile_platform }