From 809e880bd1bd369f80091d9f9e9cf451cecc0881 Mon Sep 17 00:00:00 2001 From: shinra-electric <50119606+shinra-electric@users.noreply.github.com> Date: Fri, 9 Dec 2022 20:49:56 +0100 Subject: [PATCH] [3rdParty] Update MoltenVK to 1.3.236 & set MSL Fastmath to On Demand (#13035) * Update MoltenVK to 1.2.236 * Change mvk_config.fastMathEnabled from a bool to Int fastMathEnabled now has three options: NEVER = 0 ALWAYS = 1 ON_DEMAND = 2 On demand seems better, since it will use fast math except for shaders that are incompatible. --- 3rdparty/MoltenVK/CMakeLists.txt | 2 +- rpcs3/Emu/RSX/VK/vkutils/device.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/3rdparty/MoltenVK/CMakeLists.txt b/3rdparty/MoltenVK/CMakeLists.txt index 3b0218e047..0f6db77caa 100644 --- a/3rdparty/MoltenVK/CMakeLists.txt +++ b/3rdparty/MoltenVK/CMakeLists.txt @@ -4,7 +4,7 @@ include(ExternalProject) ExternalProject_Add(moltenvk GIT_REPOSITORY https://github.com/KhronosGroup/MoltenVK.git - GIT_TAG 260bad4 + GIT_TAG a307b24 BUILD_IN_SOURCE 1 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/fetchDependencies" --macos diff --git a/rpcs3/Emu/RSX/VK/vkutils/device.cpp b/rpcs3/Emu/RSX/VK/vkutils/device.cpp index 33dd1fe992..3b3f872907 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/device.cpp +++ b/rpcs3/Emu/RSX/VK/vkutils/device.cpp @@ -151,7 +151,7 @@ namespace vk CHECK_RESULT_EX(_vkGetMoltenVKConfigurationMVK(VK_NULL_HANDLE, &mvk_config, &mvk_config_size), std::string("Could not get MoltenVK configuration.")); mvk_config.resumeLostDevice = true; - mvk_config.fastMathEnabled = !(g_cfg.video.disable_msl_fast_math.get()); + mvk_config.fastMathEnabled = g_cfg.video.disable_msl_fast_math.get() ? MVK_CONFIG_FAST_MATH_NEVER : MVK_CONFIG_FAST_MATH_ON_DEMAND; CHECK_RESULT_EX(_vkSetMoltenVKConfigurationMVK(VK_NULL_HANDLE, &mvk_config, &mvk_config_size), std::string("Could not set MoltenVK configuration.")); }