Permalink
Browse files

Merge pull request #6744 from stenzek/ui-disable-vram-copies

UI: Add Disable EFB Copies to VRAM to Advanced Options
  • Loading branch information...
stenzek committed May 4, 2018
2 parents 54a6b0f + d4f6c86 commit a5e410b7c9e07ab7d34e465c27c0f783a3b09675
@@ -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);
@@ -35,6 +35,7 @@ class AdvancedWidget final : public GraphicsWidget
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;
@@ -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)
@@ -125,7 +125,8 @@ void TextureCacheBase::OnConfigChanged(VideoConfig& config)
config.bTexFmtOverlayEnable != backup_config.texfmt_overlay ||
config.bTexFmtOverlayCenter != backup_config.texfmt_overlay_center ||
config.bHiresTextures != backup_config.hires_textures ||
config.bEnableGPUTextureDecoding != backup_config.gpu_texture_decoding)
config.bEnableGPUTextureDecoding != backup_config.gpu_texture_decoding ||
config.bDisableCopyToVRAM != backup_config.disable_vram_copies)
{
Invalidate();
@@ -228,6 +229,7 @@ void TextureCacheBase::SetBackupConfig(const VideoConfig& config)
backup_config.stereo_3d = config.stereo_mode != StereoMode::Off;
backup_config.efb_mono_depth = config.bStereoEFBMonoDepth;
backup_config.gpu_texture_decoding = config.bEnableGPUTextureDecoding;
backup_config.disable_vram_copies = config.bDisableCopyToVRAM;
}
TextureCacheBase::TCacheEntry*
@@ -350,6 +350,7 @@ class TextureCacheBase
bool stereo_3d;
bool efb_mono_depth;
bool gpu_texture_decoding;
bool disable_vram_copies;
};
BackupConfig backup_config = {};
};

0 comments on commit a5e410b

Please sign in to comment.