From f28c40aa8e8ea37591665ae262dbea40f462b3b4 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 6 Jan 2023 22:00:33 +1000 Subject: [PATCH] Qt: Expose Threaded Presentation setting --- pcsx2-qt/Settings/GraphicsSettingsWidget.cpp | 5 +++++ pcsx2-qt/Settings/GraphicsSettingsWidget.ui | 13 ++++++++++--- pcsx2/Frontend/FullscreenUI.cpp | 3 +++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index 2331127ddb..dfaf9811a4 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -244,6 +244,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useBlitSwapChain, "EmuCore/GS", "UseBlitSwapChain", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useDebugDevice, "EmuCore/GS", "UseDebugDevice", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.skipPresentingDuplicateFrames, "EmuCore/GS", "SkipDuplicateFrames", false); + SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.threadedPresentation, "EmuCore/GS", "ThreadedPresentation", false); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.overrideTextureBarriers, "EmuCore/GS", "OverrideTextureBarriers", -1, -1); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.overrideGeometryShader, "EmuCore/GS", "OverrideGeometryShaders", -1, -1); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.gsDumpCompression, "EmuCore/GS", "GSDumpCompression", static_cast(GSDumpCompressionMethod::Zstandard)); @@ -623,6 +624,10 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* "the GPU has more time to complete it (this is NOT frame skipping). Can smooth our frame time fluctuations when the CPU/GPU are near maximum " "utilization, but makes frame pacing more inconsistent and can increase input lag.")); + dialog->registerWidgetHelp(m_ui.threadedPresentation, tr("Threaded Presentation"), tr("Unchecked"), + tr("Presents frames on a worker thread, instead of on the GS thread. Can improve frame times on some systems, at the cost of " + "potentially worse frame pacing. Only applies to the Vulkan renderer.")); + dialog->registerWidgetHelp(m_ui.gsDownloadMode, tr("GS Download Mode"), tr("Accurate"), tr("Skips synchronizing with the GS thread and host GPU for GS downloads. " "Can result in a large speed boost on slower systems, at the cost of many broken graphical effects. " diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index 40b1aefab6..4f02749ff7 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -1693,6 +1693,13 @@ + + + + Skip Presenting Duplicate Frames + + + @@ -1700,10 +1707,10 @@ - - + + - Skip Presenting Duplicate Frames + Threaded Presentation diff --git a/pcsx2/Frontend/FullscreenUI.cpp b/pcsx2/Frontend/FullscreenUI.cpp index dd36499c9f..6827f5aea8 100644 --- a/pcsx2/Frontend/FullscreenUI.cpp +++ b/pcsx2/Frontend/FullscreenUI.cpp @@ -3289,6 +3289,9 @@ void FullscreenUI::DrawGraphicsSettingsPage() DrawToggleSetting(bsi, "Skip Presenting Duplicate Frames", "Skips displaying frames that don't change in 25/30fps games. Can improve speed but increase input lag/make frame pacing worse.", "EmuCore/GS", "SkipDuplicateFrames", false); + DrawToggleSetting(bsi, "Threaded Presentation", + "Presents frames on a worker thread, instead of on the GS thread. Can improve frame times on some systems, at the cost of " + "potentially worse frame pacing.", "EmuCore/GS", "ThreadedPresentation", false); DrawIntListSetting(bsi, "Override Texture Barriers", "Forces texture barrier functionality to the specified value.", "EmuCore/GS", "OverrideTextureBarriers", -1, s_generic_options, std::size(s_generic_options), -1); DrawIntListSetting(bsi, "Override Geometry Shaders", "Forces geometry shader functionality to the specified value.", "EmuCore/GS",