FPU wasn't using SIMD. Oops
Fix identation
This commit is contained in:
@@ -7,36 +7,36 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
||||
|
||||
if (WIN32)
|
||||
add_compile_definitions(NOMINMAX)
|
||||
add_compile_definitions(NOMINMAX)
|
||||
endif ()
|
||||
|
||||
include_directories(
|
||||
.
|
||||
../
|
||||
../utils
|
||||
../backend
|
||||
../backend/core
|
||||
../backend/core/mmio
|
||||
../backend/core/mmio/PIF
|
||||
../backend/core/registers
|
||||
../backend/core/rsp
|
||||
../../external
|
||||
../../external/discord_rpc/include
|
||||
../../external/xbyak
|
||||
../../external/mio/include
|
||||
../../external/fmt/include
|
||||
../../external/json/include
|
||||
../../external/parallel-rdp
|
||||
../../external/parallel-rdp
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/parallel-rdp
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/volk
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/spirv-cross
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/vulkan
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/vulkan-headers/include
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/util
|
||||
../../external/unarr
|
||||
../../external/SDL/include
|
||||
../../external/capstone/include
|
||||
.
|
||||
../
|
||||
../utils
|
||||
../backend
|
||||
../backend/core
|
||||
../backend/core/mmio
|
||||
../backend/core/mmio/PIF
|
||||
../backend/core/registers
|
||||
../backend/core/rsp
|
||||
../../external
|
||||
../../external/discord_rpc/include
|
||||
../../external/xbyak
|
||||
../../external/mio/include
|
||||
../../external/fmt/include
|
||||
../../external/json/include
|
||||
../../external/parallel-rdp
|
||||
../../external/parallel-rdp
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/parallel-rdp
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/volk
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/spirv-cross
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/vulkan
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/vulkan-headers/include
|
||||
../../external/parallel-rdp/parallel-rdp-standalone/util
|
||||
../../external/unarr
|
||||
../../external/SDL/include
|
||||
../../external/capstone/include
|
||||
)
|
||||
|
||||
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF)
|
||||
@@ -44,6 +44,19 @@ option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." OFF)
|
||||
option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." OFF)
|
||||
option(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
check_c_compiler_flag(-msse4.1 HAS_SSE4_1)
|
||||
|
||||
if (HAS_SSE4_1)
|
||||
add_compile_definitions(SIMD_SUPPORT)
|
||||
add_compile_options(-msse3 -msse4.1)
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
add_compile_definitions(VULKAN_DEBUG)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(../../external/discord_rpc discord_rpc)
|
||||
add_subdirectory(../../external/json json)
|
||||
add_subdirectory(../../external/fmt fmt)
|
||||
@@ -59,48 +72,33 @@ set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
add_executable(kaizen-qt
|
||||
main.cpp
|
||||
KaizenQt.hpp
|
||||
KaizenQt.cpp
|
||||
RenderWidget.cpp
|
||||
RenderWidget.hpp
|
||||
EmuThread.hpp
|
||||
EmuThread.cpp
|
||||
MainWindow.hpp
|
||||
MainWindow.cpp
|
||||
SettingsWindow.hpp
|
||||
SettingsWindow.cpp
|
||||
CPUSettings.hpp
|
||||
CPUSettings.cpp
|
||||
JSONUtils.hpp
|
||||
AudioSettings.hpp
|
||||
AudioSettings.cpp
|
||||
InputSettings.hpp
|
||||
InputSettings.cpp
|
||||
Debugger.hpp
|
||||
Debugger.cpp
|
||||
CodeModel.hpp)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
check_c_compiler_flag(-msse4.1 HAS_SSE4_1)
|
||||
|
||||
if (HAS_SSE4_1)
|
||||
target_compile_definitions(kaizen-qt PUBLIC SIMD_SUPPORT)
|
||||
target_compile_options(kaizen-qt PUBLIC -msse3 -msse4.1)
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
target_compile_definitions(kaizen-qt PUBLIC VULKAN_DEBUG)
|
||||
#target_compile_options(kaizen-qt PUBLIC -fsanitize=address -fsanitize=undefined)
|
||||
#target_link_options(kaizen-qt PUBLIC -fsanitize=address -fsanitize=undefined)
|
||||
endif ()
|
||||
main.cpp
|
||||
KaizenQt.hpp
|
||||
KaizenQt.cpp
|
||||
RenderWidget.cpp
|
||||
RenderWidget.hpp
|
||||
EmuThread.hpp
|
||||
EmuThread.cpp
|
||||
MainWindow.hpp
|
||||
MainWindow.cpp
|
||||
SettingsWindow.hpp
|
||||
SettingsWindow.cpp
|
||||
CPUSettings.hpp
|
||||
CPUSettings.cpp
|
||||
JSONUtils.hpp
|
||||
AudioSettings.hpp
|
||||
AudioSettings.cpp
|
||||
InputSettings.hpp
|
||||
InputSettings.cpp
|
||||
Debugger.hpp
|
||||
Debugger.cpp
|
||||
CodeModel.hpp)
|
||||
|
||||
target_link_libraries(kaizen-qt PUBLIC SDL3::SDL3 SDL3::SDL3-static Qt6::Core Qt6::Gui Qt6::Widgets discord-rpc fmt mio nlohmann_json parallel-rdp backend)
|
||||
target_compile_definitions(kaizen-qt PUBLIC SDL_MAIN_HANDLED)
|
||||
|
||||
file(COPY ../../resources/ DESTINATION ${PROJECT_BINARY_DIR}/resources/)
|
||||
file(REMOVE
|
||||
${PROJECT_BINARY_DIR}/resources/mario.png
|
||||
${PROJECT_BINARY_DIR}/resources/shader.frag
|
||||
${PROJECT_BINARY_DIR}/resources/shader.vert)
|
||||
${PROJECT_BINARY_DIR}/resources/mario.png
|
||||
${PROJECT_BINARY_DIR}/resources/shader.frag
|
||||
${PROJECT_BINARY_DIR}/resources/shader.vert)
|
||||
@@ -1,7 +1,3 @@
|
||||
//
|
||||
// Created by simone on 6/25/24.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include <cmath>
|
||||
#include <common.hpp>
|
||||
@@ -9,7 +5,7 @@
|
||||
|
||||
namespace Util {
|
||||
template <typename T>
|
||||
static inline T roundCeil(float f) {
|
||||
static FORCE_INLINE T roundCeil(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_POS_INF);
|
||||
@@ -20,7 +16,7 @@ static inline T roundCeil(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundCeil(double f) {
|
||||
static FORCE_INLINE T roundCeil(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_POS_INF);
|
||||
@@ -31,7 +27,7 @@ static inline T roundCeil(double f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundNearest(float f) {
|
||||
static FORCE_INLINE T roundNearest(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_NEAREST_INT);
|
||||
@@ -42,7 +38,7 @@ static inline T roundNearest(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundNearest(double f) {
|
||||
static FORCE_INLINE T roundNearest(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_NEAREST_INT);
|
||||
@@ -53,7 +49,7 @@ static inline T roundNearest(double f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundCurrent(float f) {
|
||||
static FORCE_INLINE T roundCurrent(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
auto t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_CUR_DIRECTION);
|
||||
@@ -64,7 +60,7 @@ static inline T roundCurrent(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundCurrent(double f) {
|
||||
static FORCE_INLINE T roundCurrent(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
auto t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_CUR_DIRECTION);
|
||||
@@ -76,7 +72,7 @@ static inline T roundCurrent(double f) {
|
||||
|
||||
|
||||
template <typename T>
|
||||
static inline T roundFloor(float f) {
|
||||
static FORCE_INLINE T roundFloor(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_NEG_INF);
|
||||
@@ -87,7 +83,7 @@ static inline T roundFloor(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundFloor(double f) {
|
||||
static FORCE_INLINE T roundFloor(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_NEG_INF);
|
||||
@@ -98,7 +94,7 @@ static inline T roundFloor(double f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundTrunc(float f) {
|
||||
static FORCE_INLINE T roundTrunc(float f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128 t = _mm_set_ss(f);
|
||||
t = _mm_round_ss(t, t, _MM_FROUND_TO_ZERO);
|
||||
@@ -109,7 +105,7 @@ static inline T roundTrunc(float f) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T roundTrunc(double f) {
|
||||
static FORCE_INLINE T roundTrunc(double f) {
|
||||
#ifdef SIMD_SUPPORT
|
||||
__m128d t = _mm_set_sd(f);
|
||||
t = _mm_round_sd(t, t, _MM_FROUND_TO_ZERO);
|
||||
|
||||
Reference in New Issue
Block a user