From acc2fea7e3d66e2aafcfa094148200a48053a902 Mon Sep 17 00:00:00 2001 From: nastys <7950891+nastys@users.noreply.github.com> Date: Tue, 20 Sep 2022 10:12:27 +0200 Subject: [PATCH] Update MoltenVK to 250e1f9 and single queue (#12620) --- 3rdparty/MoltenVK/CMakeLists.txt | 2 +- rpcs3/Emu/RSX/VK/vkutils/device.cpp | 2 +- rpcs3/Emu/system_config.h | 1 - rpcs3/rpcs3qt/emu_settings_type.h | 2 -- rpcs3/rpcs3qt/settings_dialog.cpp | 3 --- rpcs3/rpcs3qt/settings_dialog.ui | 7 ------- rpcs3/rpcs3qt/tooltips.h | 1 - 7 files changed, 2 insertions(+), 16 deletions(-) diff --git a/3rdparty/MoltenVK/CMakeLists.txt b/3rdparty/MoltenVK/CMakeLists.txt index 9136747aab..bdf160860f 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 1112005 + GIT_TAG 250e1f9 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 40f7a8f4f8..ee6595c172 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.semaphoreUseMTLEvent = mvk_config.semaphoreUseMTLFence = !(g_cfg.video.mvk_software_vksemaphore.get()); + mvk_config.semaphoreSupportStyle = MVKVkSemaphoreSupportStyle::MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE_SINGLE_QUEUE; mvk_config.fastMathEnabled = !(g_cfg.video.disable_msl_fast_math.get()); CHECK_RESULT_EX(_vkSetMoltenVKConfigurationMVK(VK_NULL_HANDLE, &mvk_config, &mvk_config_size), std::string("Could not set MoltenVK configuration.")); diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index d83f6e5a4c..897539c8a4 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -180,7 +180,6 @@ struct cfg_root : cfg::node cfg::_bool decr_memory_layout{ this, "DECR memory layout", false}; // Force enable increased allowed main memory range as DECR console cfg::_bool host_label_synchronization{ this, "Allow Host GPU Labels", false }; cfg::_bool disable_msl_fast_math{ this, "Disable MSL Fast Math", false }; - cfg::_bool mvk_software_vksemaphore{ this, "Software VkSemaphore", false }; struct node_vk : cfg::node { diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index bbedd6e7e0..6957030a7a 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -97,7 +97,6 @@ enum class emu_settings_type VulkanAsyncSchedulerDriver, AllowHostGPULabels, DisableMSLFastMath, - SoftwareVkSemaphore, // Performance Overlay PerfOverlayEnabled, @@ -267,7 +266,6 @@ inline static const QMap settings_location = { emu_settings_type::DriverWakeUpDelay, { "Video", "Driver Wake-Up Delay"}}, { emu_settings_type::AllowHostGPULabels, { "Video", "Allow Host GPU Labels"}}, { emu_settings_type::DisableMSLFastMath, { "Video", "Disable MSL Fast Math"}}, - { emu_settings_type::SoftwareVkSemaphore, { "Video", "Software VkSemaphore"}}, // Vulkan { emu_settings_type::VulkanAsyncTextureUploads, { "Video", "Vulkan", "Asynchronous Texture Streaming 2"}}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index b4bb0a2882..5c19a9a659 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -1352,13 +1352,10 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std }); m_emu_settings->EnhanceCheckBox(ui->disableMslFastMath, emu_settings_type::DisableMSLFastMath); - m_emu_settings->EnhanceCheckBox(ui->softwareVkSemaphore, emu_settings_type::SoftwareVkSemaphore); #ifdef __APPLE__ SubscribeTooltip(ui->disableMslFastMath, tooltips.settings.disable_msl_fast_math); - SubscribeTooltip(ui->softwareVkSemaphore, tooltips.settings.mvk_software_vksemaphore); #else ui->disableMslFastMath->setVisible(false); - ui->softwareVkSemaphore->setVisible(false); #endif // Comboboxes diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index ed3a4d7aeb..b25924feb9 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -2558,13 +2558,6 @@ - - - - Software VkSemaphore - - - diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index 78c7b62f5a..08f7b11559 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -42,7 +42,6 @@ public: const QString vulkan_async_scheduler = tr("Determines how to schedule GPU async compute jobs when using asynchronous streaming.\nUse 'Safe' mode for more spec compliant behavior at the cost of some CPU overhead. This setting works with all devices.\nUse 'Fast' to use a faster but hacky version. This option is internally disabled for NVIDIA GPUs due to causing GPU hangs."); const QString allow_host_labels = tr("Allows the host GPU to synchronize with CELL directly. This incurs a performance penalty, but exposes the true state of GPU objects to the guest CPU. Can help eliminate visual noise and glitching at the cost of performance. Use with caution."); const QString disable_msl_fast_math = tr("Disables Fast Math for MSL shaders, which may violate the IEEE 754 standard.\nDisabling it may fix some artefacts especially on Apple GPUs, at the cost of performance."); - const QString mvk_software_vksemaphore = tr("Emulates VkSemaphore purely in software instead of using MTLEvent/MTLFence.\nEnabling this might fix artefacts caused by synchronization issues, but can cause tearing and usually has a very high performance cost.\nMainly affects Apple GPUs when running the emulator using Rosetta."); // audio