From d4f6c86eecbaaa7f1bd8884dd40511c055c0fbab Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 3 May 2018 14:24:56 +1000 Subject: [PATCH] UI: Add Disable EFB Copies to VRAM to Advanced Options --- .../DolphinQt2/Config/Graphics/AdvancedWidget.cpp | 11 +++++++++-- .../Core/DolphinQt2/Config/Graphics/AdvancedWidget.h | 1 + Source/Core/DolphinWX/VideoConfigDiag.cpp | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp b/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp index 897aa6a8b7..0c98439670 100644 --- a/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp +++ b/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.cpp @@ -65,6 +65,8 @@ void AdvancedWidget::CreateWidgets() m_use_fullres_framedumps = new GraphicsBool(tr("Internal Resolution Frame Dumps"), Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS); m_dump_efb_target = new GraphicsBool(tr("Dump EFB Target"), Config::GFX_DUMP_EFB_TARGET); + m_disable_vram_copies = + new GraphicsBool(tr("Disable EFB VRAM Copies"), Config::GFX_HACK_DISABLE_COPY_TO_VRAM); m_enable_freelook = new GraphicsBool(tr("Free Look"), Config::GFX_FREE_LOOK); m_dump_use_ffv1 = new GraphicsBool(tr("Frame Dumps Use FFV1"), Config::GFX_USE_FFV1); @@ -73,9 +75,10 @@ void AdvancedWidget::CreateWidgets() utility_layout->addWidget(m_prefetch_custom_textures, 1, 0); utility_layout->addWidget(m_use_fullres_framedumps, 1, 1); utility_layout->addWidget(m_dump_efb_target, 2, 0); - utility_layout->addWidget(m_enable_freelook, 2, 1); + utility_layout->addWidget(m_disable_vram_copies, 2, 1); + utility_layout->addWidget(m_enable_freelook, 3, 0); #if defined(HAVE_FFMPEG) - utility_layout->addWidget(m_dump_use_ffv1, 3, 0); + utility_layout->addWidget(m_dump_use_ffv1, 3, 1); #endif // Misc. @@ -154,6 +157,9 @@ void AdvancedWidget::AddDescriptions() static const char* TR_DUMP_EFB_DESCRIPTION = QT_TR_NOOP("Dump the contents of EFB copies to User/Dump/Textures/.\n\nIf unsure, leave this " "unchecked."); + static const char* TR_DISABLE_VRAM_COPIES_DESCRIPTION = + QT_TR_NOOP("Disables the VRAM copy of the EFB, forcing a round-trip to RAM. Inhibits all " + "upscaling.\n\nIf unsure, leave this unchecked."); static const char* TR_INTERNAL_RESOLUTION_FRAME_DUMPING_DESCRIPTION = QT_TR_NOOP( "Create frame dumps and screenshots at the internal resolution of the renderer, rather than " "the size of the window it is displayed within. If the aspect ratio is widescreen, the " @@ -196,6 +202,7 @@ void AdvancedWidget::AddDescriptions() AddDescription(m_load_custom_textures, TR_LOAD_CUSTOM_TEXTURE_DESCRIPTION); AddDescription(m_prefetch_custom_textures, TR_CACHE_CUSTOM_TEXTURE_DESCRIPTION); AddDescription(m_dump_efb_target, TR_DUMP_EFB_DESCRIPTION); + AddDescription(m_disable_vram_copies, TR_DISABLE_VRAM_COPIES_DESCRIPTION); AddDescription(m_use_fullres_framedumps, TR_INTERNAL_RESOLUTION_FRAME_DUMPING_DESCRIPTION); #ifdef HAVE_FFMPEG AddDescription(m_dump_use_ffv1, TR_USE_FFV1_DESCRIPTION); diff --git a/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.h b/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.h index fa3a419adb..d5e92f3e0c 100644 --- a/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.h +++ b/Source/Core/DolphinQt2/Config/Graphics/AdvancedWidget.h @@ -35,6 +35,7 @@ private: QCheckBox* m_dump_textures; QCheckBox* m_prefetch_custom_textures; QCheckBox* m_dump_efb_target; + QCheckBox* m_disable_vram_copies; QCheckBox* m_dump_use_ffv1; QCheckBox* m_load_custom_textures; QCheckBox* m_use_fullres_framedumps; diff --git a/Source/Core/DolphinWX/VideoConfigDiag.cpp b/Source/Core/DolphinWX/VideoConfigDiag.cpp index cea5f4921a..4ff96b4e9b 100644 --- a/Source/Core/DolphinWX/VideoConfigDiag.cpp +++ b/Source/Core/DolphinWX/VideoConfigDiag.cpp @@ -238,6 +238,9 @@ static wxString dump_efb_desc = wxTRANSLATE( "Dump the contents of EFB copies to User/Dump/Textures/.\n\nIf unsure, leave this unchecked."); static wxString dump_xfb_desc = wxTRANSLATE( "Dump the contents of XFB copies to User/Dump/Textures/.\n\nIf unsure, leave this unchecked."); +static wxString disable_vram_copies_desc = + wxTRANSLATE("Disables the VRAM copy of the EFB, forcing a round-trip to RAM. Inhibits all " + "upscaling.\n\nIf unsure, leave this unchecked."); static wxString internal_resolution_frame_dumping_desc = wxTRANSLATE( "Create frame dumps and screenshots at the internal resolution of the renderer, rather than " "the size of the window it is displayed within. If the aspect ratio is widescreen, the output " @@ -868,6 +871,9 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title) szr_utility->Add(CreateCheckBox(page_advanced, _("Dump XFB Target"), wxGetTranslation(dump_xfb_desc), Config::GFX_DUMP_XFB_TARGET)); + szr_utility->Add(CreateCheckBox(page_advanced, _("Disable EFB VRAM Copies"), + wxGetTranslation(disable_vram_copies_desc), + Config::GFX_HACK_DISABLE_COPY_TO_VRAM)); szr_utility->Add(CreateCheckBox(page_advanced, _("Free Look"), wxGetTranslation(free_look_desc), Config::GFX_FREE_LOOK)); #if defined(HAVE_FFMPEG)