Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MoltenVK to 250e1f9 and single queue #12620

Merged
merged 4 commits into from Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/MoltenVK/CMakeLists.txt
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/VK/vkutils/device.cpp
Expand Up @@ -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."));
Expand Down
1 change: 0 additions & 1 deletion rpcs3/Emu/system_config.h
Expand Up @@ -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
{
Expand Down
2 changes: 0 additions & 2 deletions rpcs3/rpcs3qt/emu_settings_type.h
Expand Up @@ -97,7 +97,6 @@ enum class emu_settings_type
VulkanAsyncSchedulerDriver,
AllowHostGPULabels,
DisableMSLFastMath,
SoftwareVkSemaphore,

// Performance Overlay
PerfOverlayEnabled,
Expand Down Expand Up @@ -267,7 +266,6 @@ inline static const QMap<emu_settings_type, cfg_location> 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"}},
Expand Down
3 changes: 0 additions & 3 deletions rpcs3/rpcs3qt/settings_dialog.cpp
Expand Up @@ -1352,13 +1352,10 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> 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
Expand Down
7 changes: 0 additions & 7 deletions rpcs3/rpcs3qt/settings_dialog.ui
Expand Up @@ -2558,13 +2558,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="softwareVkSemaphore">
<property name="text">
<string>Software VkSemaphore</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
1 change: 0 additions & 1 deletion rpcs3/rpcs3qt/tooltips.h
Expand Up @@ -42,7 +42,6 @@ class Tooltips : public QObject
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

Expand Down