Add new GUI option to skip XFBToRam and remove old XFB options

This commit is contained in:
iwubcode
2017-06-25 22:23:47 -05:00
parent 198d3b69b4
commit 65cd085f9b
25 changed files with 51 additions and 170 deletions

View File

@ -201,6 +201,10 @@ static wxString skip_efb_copy_to_ram_desc = wxTRANSLATE(
"Stores EFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
"in a small number of games.\n\nEnabled = EFB Copies to Texture\nDisabled = EFB Copies to RAM "
"(and Texture)\n\nIf unsure, leave this checked.");
static wxString skip_xfb_copy_to_ram_desc = wxTRANSLATE(
"Stores XFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
"in a small number of games that need to readback from memory.\n\nEnabled = XFB Copies to Texture\nDisabled = XFB Copies to RAM "
"(and Texture)\n\nIf unsure, leave this checked.");
static wxString stc_desc =
wxTRANSLATE("The \"Safe\" setting eliminates the likelihood of the GPU missing texture updates "
"from RAM.\nLower accuracies cause in-game text to appear garbled in certain "
@ -229,17 +233,6 @@ static wxString show_netplay_messages_desc =
static wxString texfmt_desc =
wxTRANSLATE("Modify textures to show the format they're encoded in. Needs an emulation reset "
"in most cases.\n\nIf unsure, leave this unchecked.");
static wxString xfb_desc = wxTRANSLATE(
"Disable any XFB emulation.\nSpeeds up emulation a lot but causes heavy glitches in many games "
"which rely on them (especially homebrew applications).\n\nIf unsure, leave this checked.");
static wxString xfb_virtual_desc = wxTRANSLATE(
"Emulate XFBs using GPU texture objects.\nFixes many games which don't work without XFB "
"emulation while not being as slow as real XFB emulation. However, it may still fail for a lot "
"of other games (especially homebrew applications).\n\nIf unsure, leave this checked.");
static wxString xfb_real_desc =
wxTRANSLATE("Emulate XFBs accurately.\nSlows down emulation a lot and prohibits "
"high-resolution rendering but is necessary to emulate a number of games "
"properly.\n\nIf unsure, check virtual XFB emulation instead.");
static wxString dump_textures_desc =
wxTRANSLATE("Dump decoded game textures to User/Dump/Textures/<game_id>/.\n\nIf unsure, leave "
"this unchecked.");
@ -724,6 +717,11 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM),
0, wxLEFT | wxRIGHT, space5);
szr_efb->AddSpacer(space5);
szr_efb->Add(CreateCheckBox(page_hacks, _("Store XFB Copies to Texture Only"),
wxGetTranslation(skip_xfb_copy_to_ram_desc),
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM),
0, wxLEFT | wxRIGHT, space5);
szr_efb->AddSpacer(space5);
szr_hacks->AddSpacer(space5);
szr_hacks->Add(szr_efb, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
@ -782,31 +780,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
szr_hacks->Add(szr_safetex, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
}
// - XFB
{
wxStaticBoxSizer* const group_xfb =
new wxStaticBoxSizer(wxVERTICAL, page_hacks, _("External Frame Buffer (XFB)"));
SettingCheckBox* disable_xfb = CreateCheckBox(
page_hacks, _("Disable"), wxGetTranslation(xfb_desc), Config::GFX_USE_XFB, true);
virtual_xfb = CreateRadioButton(page_hacks, _("Virtual"), wxGetTranslation(xfb_virtual_desc),
Config::GFX_USE_REAL_XFB, true, wxRB_GROUP);
real_xfb = CreateRadioButton(page_hacks, _("Real"), wxGetTranslation(xfb_real_desc),
Config::GFX_USE_REAL_XFB);
wxBoxSizer* const szr = new wxBoxSizer(wxHORIZONTAL);
szr->Add(disable_xfb, 0, wxALIGN_CENTER_VERTICAL);
szr->AddStretchSpacer(1);
szr->Add(virtual_xfb, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space5);
szr->Add(real_xfb, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space5);
group_xfb->Add(szr, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
group_xfb->AddSpacer(space5);
szr_hacks->AddSpacer(space5);
szr_hacks->Add(group_xfb, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
} // xfb
// - other hacks
{
wxGridSizer* const szr_other = new wxGridSizer(2, space5, space5);
@ -1112,10 +1085,6 @@ void VideoConfigDiag::OnUpdateUI(wxUpdateUIEvent& ev)
choice_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
text_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
// XFB
virtual_xfb->Enable(vconfig.bUseXFB);
real_xfb->Enable(vconfig.bUseXFB);
// custom textures
cache_hires_textures->Enable(vconfig.bHiresTextures);