diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 8741c56203..6b2df0502b 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -116,6 +116,13 @@ elseif("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64" OR "${CMAKE_HOST_SYSTEM detect_cache_line_size() list(APPEND PCSX2_DEFS OVERRIDE_HOST_CACHE_LINE_SIZE=${HOST_CACHE_LINE_SIZE}) endif() + + # Windows page/cache line size seems to match x68-64 + if(WIN32) + list(APPEND PCSX2_DEFS OVERRIDE_HOST_PAGE_SIZE=0x1000) + # Value of std::hardware_destructive_interference_size for ARM64 on MSVC toolset 14.40.33807 + list(APPEND PCSX2_DEFS OVERRIDE_HOST_CACHE_LINE_SIZE=64) + endif() else() message(FATAL_ERROR "Unsupported architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}") endif() diff --git a/common/vsprops/common.props b/common/vsprops/common.props index 179f5e35b1..d97da47b8d 100644 --- a/common/vsprops/common.props +++ b/common/vsprops/common.props @@ -29,6 +29,7 @@ true $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories);$(DepsIncludeDir) __WIN32__;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;NOMINMAX;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_HAS_EXCEPTIONS=0;WINVER=0x0A00;_WIN32_WINNT=0x0A00;%(PreprocessorDefinitions) + OVERRIDE_HOST_PAGE_SIZE=0x1000;OVERRIDE_HOST_CACHE_LINE_SIZE=64;%(PreprocessorDefinitions) PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;%(PreprocessorDefinitions) PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;%(PreprocessorDefinitions) NDEBUG;_SECURE_SCL_=0;%(PreprocessorDefinitions)