Merge pull request #2089 from degasus/remove_disable_efb_copy

Remove disable efb copy
This commit is contained in:
Pierre Bourdon 2015-02-24 23:31:05 +01:00
commit f06b1106db
12 changed files with 18 additions and 56 deletions

View File

@ -1211,8 +1211,8 @@ void SaveRecording(const std::string& filename)
strncpy((char *)header.videoBackend, s_videoBackend.c_str(),ArraySize(header.videoBackend));
header.CPUCore = s_iCPUCore;
header.bEFBAccessEnable = g_ActiveConfig.bEFBAccessEnable;
header.bEFBCopyEnable = g_ActiveConfig.bEFBCopyEnable;
header.bCopyEFBToTexture = g_ActiveConfig.bCopyEFBToTexture;
header.bEFBCopyEnable = true;
header.bSkipEFBCopyToRam = g_ActiveConfig.bSkipEFBCopyToRam;
header.bEFBCopyCacheEnable = false;
header.bEFBEmulateFormatChanges = g_ActiveConfig.bEFBEmulateFormatChanges;
header.bUseXFB = g_ActiveConfig.bUseXFB;
@ -1273,8 +1273,7 @@ void CallWiiInputManip(u8* data, WiimoteEmu::ReportFeatures rptf, int controller
void SetGraphicsConfig()
{
g_Config.bEFBAccessEnable = tmpHeader.bEFBAccessEnable;
g_Config.bEFBCopyEnable = tmpHeader.bEFBCopyEnable;
g_Config.bCopyEFBToTexture = tmpHeader.bCopyEFBToTexture;
g_Config.bSkipEFBCopyToRam = tmpHeader.bSkipEFBCopyToRam;
g_Config.bEFBEmulateFormatChanges = tmpHeader.bEFBEmulateFormatChanges;
g_Config.bUseXFB = tmpHeader.bUseXFB;
g_Config.bUseRealXFB = tmpHeader.bUseRealXFB;

View File

@ -91,7 +91,7 @@ struct DTMHeader
u8 CPUCore; // 0 = interpreter, 1 = JIT, 2 = JITIL
bool bEFBAccessEnable;
bool bEFBCopyEnable;
bool bCopyEFBToTexture;
bool bSkipEFBCopyToRam;
bool bEFBCopyCacheEnable;
bool bEFBEmulateFormatChanges;
bool bUseXFB;

View File

@ -1344,14 +1344,7 @@ void CFrame::ParseHotkeys(wxKeyEvent &event)
{
OSDChoice = 3;
// Toggle EFB copies between EFB2RAM and EFB2Texture
if (!g_Config.bEFBCopyEnable)
{
OSD::AddMessage("EFB Copies are disabled, enable them in Graphics settings for toggling", 6000);
}
else
{
g_Config.bCopyEFBToTexture = !g_Config.bCopyEFBToTexture;
}
g_Config.bSkipEFBCopyToRam = !g_Config.bSkipEFBCopyToRam;
}
else if (IsHotkey(event, HK_TOGGLE_FOG))
{

View File

@ -123,9 +123,7 @@ static wxString borderless_fullscreen_desc = wxTRANSLATE("Implement fullscreen m
static wxString internal_res_desc = wxTRANSLATE("Specifies the resolution used to render at. A high resolution greatly improves visual quality, but also greatly increases GPU load and can cause issues in certain games.\n\"Multiple of 640x528\" will result in a size slightly larger than \"Window Size\" but yield fewer issues. Generally speaking, the lower the internal resolution is, the better your performance will be.\n\nIf unsure, select 640x528.");
static wxString efb_access_desc = wxTRANSLATE("Ignore any requests from the CPU to read from or write to the EFB.\nImproves performance in some games, but might disable some gameplay-related features or graphical effects.\n\nIf unsure, leave this unchecked.");
static wxString efb_emulate_format_changes_desc = wxTRANSLATE("Ignore any changes to the EFB format.\nImproves performance in many games without any negative effect. Causes graphical defects in a small number of other games.\n\nIf unsure, leave this checked.");
static wxString efb_copy_desc = wxTRANSLATE("Disable emulation of EFB copies.\nThese are often used for post-processing or render-to-texture effects, so while checking this setting may give a minor speedup over EFB to Texture it almost invariably also causes issues.\n\nIf unsure, leave this unchecked.");
static wxString efb_copy_texture_desc = wxTRANSLATE("Store EFB copies in GPU texture objects.\nThis isn't particularly accurate, but it works well enough for most games and gives a great speedup over EFB to RAM.\n\nIf unsure, leave this checked.");
static wxString efb_copy_ram_desc = wxTRANSLATE("Accurately emulate EFB copies.\nNumerous games depend on this for certain graphical effects or gameplay functionality.\nThis is much slower than EFB to Texture.\n\nIf unsure, check EFB to Texture instead.");
static wxString skip_efb_copy_to_ram_desc = wxTRANSLATE("Skip GPU synchronizing on EFB copies. Causes graphical defects in a small number of games.\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 games.\n\nIf unsure, use the rightmost value.");
static wxString wireframe_desc = wxTRANSLATE("Render the scene as a wireframe.\n\nIf unsure, leave this unchecked.");
static wxString disable_fog_desc = wxTRANSLATE("Makes distant objects more visible by removing fog, thus increasing the overall detail.\nDisabling fog will break some games which rely on proper fog emulation.\n\nIf unsure, leave this unchecked.");
@ -479,21 +477,10 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// - EFB hacks
wxStaticBoxSizer* const szr_efb = new wxStaticBoxSizer(wxVERTICAL, page_hacks, _("Embedded Frame Buffer (EFB)"));
// EFB copies
wxStaticBoxSizer* const group_efbcopy = new wxStaticBoxSizer(wxHORIZONTAL, page_hacks, _("EFB Copies"));
SettingCheckBox* efbcopy_disable = CreateCheckBox(page_hacks, _("Disable"), wxGetTranslation(efb_copy_desc), vconfig.bEFBCopyEnable, true);
efbcopy_texture = CreateRadioButton(page_hacks, _("Texture"), wxGetTranslation(efb_copy_texture_desc), vconfig.bCopyEFBToTexture, false, wxRB_GROUP);
efbcopy_ram = CreateRadioButton(page_hacks, _("RAM"), wxGetTranslation(efb_copy_ram_desc), vconfig.bCopyEFBToTexture, true);
group_efbcopy->Add(efbcopy_disable, 0, wxLEFT | wxRIGHT | wxBOTTOM, 5);
group_efbcopy->AddStretchSpacer(1);
group_efbcopy->Add(efbcopy_texture, 0, wxRIGHT, 5);
group_efbcopy->Add(efbcopy_ram, 0, wxRIGHT, 5);
szr_efb->Add(CreateCheckBox(page_hacks, _("Skip EFB Access from CPU"), wxGetTranslation(efb_access_desc), vconfig.bEFBAccessEnable, true), 0, wxBOTTOM | wxLEFT, 5);
szr_efb->Add(CreateCheckBox(page_hacks, _("Ignore Format Changes"), wxGetTranslation(efb_emulate_format_changes_desc), vconfig.bEFBEmulateFormatChanges, true), 0, wxBOTTOM | wxLEFT, 5);
szr_efb->Add(group_efbcopy, 0, wxEXPAND | wxALL, 5);
szr_efb->Add(CreateCheckBox(page_hacks, _("Skip EFB copies to RAM"), wxGetTranslation(skip_efb_copy_to_ram_desc), vconfig.bSkipEFBCopyToRam), 0, wxBOTTOM | wxLEFT, 5);
szr_hacks->Add(szr_efb, 0, wxEXPAND | wxALL, 5);
// Texture cache

View File

@ -200,10 +200,6 @@ protected:
choice_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
text_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
// EFB copy
efbcopy_texture->Enable(vconfig.bEFBCopyEnable);
efbcopy_ram->Enable(vconfig.bEFBCopyEnable);
// XFB
virtual_xfb->Enable(vconfig.bUseXFB);
real_xfb->Enable(vconfig.bUseXFB);
@ -268,9 +264,6 @@ protected:
SettingCheckBox* borderless_fullscreen;
SettingCheckBox* render_to_main_checkbox;
SettingRadioButton* efbcopy_texture;
SettingRadioButton* efbcopy_ram;
SettingRadioButton* virtual_xfb;
SettingRadioButton* real_xfb;

View File

@ -172,7 +172,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
g_renderer->RestoreAPIState();
if (!g_ActiveConfig.bCopyEFBToTexture)
if (!g_ActiveConfig.bSkipEFBCopyToRam)
{
u8* dst = Memory::GetPointer(dstAddr);
size_t encoded_size = g_encoder->Encode(dst, dstFormat, srcFormat, srcRect, isIntensity, scaleByHalf);

View File

@ -205,7 +205,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
if (false == g_ActiveConfig.bCopyEFBToTexture)
if (!g_ActiveConfig.bSkipEFBCopyToRam)
{
int encoded_size = TextureConverter::EncodeToRamFromTexture(
dstAddr,

View File

@ -90,11 +90,8 @@ void CopyEFB(u32 dstAddr, const EFBRectangle& srcRect,
bool isIntensity, bool scaleByHalf)
{
// bpmem.zcontrol.pixel_format to PEControl::Z24 is when the game wants to copy from ZBuffer (Zbuffer uses 24-bit Format)
if (g_ActiveConfig.bEFBCopyEnable)
{
TextureCache::CopyRenderTargetToTexture(dstAddr, dstFormat, srcFormat,
srcRect, isIntensity, scaleByHalf);
}
TextureCache::CopyRenderTargetToTexture(dstAddr, dstFormat, srcFormat,
srcRect, isIntensity, scaleByHalf);
}
/* Explanation of the magic behind ClearScreen:

View File

@ -375,8 +375,7 @@ void Renderer::DrawDebugText()
break;
}
const char* const efbcopy_text = g_ActiveConfig.bEFBCopyEnable ?
(g_ActiveConfig.bCopyEFBToTexture ? "to Texture" : "to RAM") : "Disabled";
const char* const efbcopy_text = g_ActiveConfig.bSkipEFBCopyToRam ? "to Texture" : "to RAM";
// The rows
const std::string lines[] =

View File

@ -356,7 +356,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage)
// EFB copies have slightly different rules: the hash doesn't need to match
// in EFB2Tex mode, and EFB copy formats have different meanings from texture
// formats.
if (g_ActiveConfig.bCopyEFBToTexture ||
if (g_ActiveConfig.bSkipEFBCopyToRam ||
(tex_hash == entry->hash && (!isPaletteTexture || g_Config.backend_info.bSupportsPaletteConversion)))
{
// TODO: We should check format/width/height/levels for EFB copies. Checking

View File

@ -97,8 +97,7 @@ void VideoConfig::Load(const std::string& ini_file)
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
hacks->Get("EFBAccessEnable", &bEFBAccessEnable, true);
hacks->Get("EFBCopyEnable", &bEFBCopyEnable, true);
hacks->Get("EFBToTextureEnable", &bCopyEFBToTexture, true);
hacks->Get("EFBToTextureEnable", &bSkipEFBCopyToRam, true);
hacks->Get("EFBScaledCopy", &bCopyEFBScaled, true);
hacks->Get("EFBEmulateFormatChanges", &bEFBEmulateFormatChanges, false);
@ -197,8 +196,7 @@ void VideoConfig::GameIniLoad()
CHECK_SETTING("Video_Stereoscopy", "StereoConvergenceMinimum", iStereoConvergenceMinimum);
CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable);
CHECK_SETTING("Video_Hacks", "EFBCopyEnable", bEFBCopyEnable);
CHECK_SETTING("Video_Hacks", "EFBToTextureEnable", bCopyEFBToTexture);
CHECK_SETTING("Video_Hacks", "EFBToTextureEnable", bSkipEFBCopyToRam);
CHECK_SETTING("Video_Hacks", "EFBScaledCopy", bCopyEFBScaled);
CHECK_SETTING("Video_Hacks", "EFBEmulateFormatChanges", bEFBEmulateFormatChanges);
@ -285,8 +283,7 @@ void VideoConfig::Save(const std::string& ini_file)
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
hacks->Set("EFBAccessEnable", bEFBAccessEnable);
hacks->Set("EFBCopyEnable", bEFBCopyEnable);
hacks->Set("EFBToTextureEnable", bCopyEFBToTexture);
hacks->Set("EFBToTextureEnable", bSkipEFBCopyToRam);
hacks->Set("EFBScaledCopy", bCopyEFBScaled);
hacks->Set("EFBEmulateFormatChanges", bEFBEmulateFormatChanges);

View File

@ -113,9 +113,8 @@ struct VideoConfig final
bool bEFBAccessEnable;
bool bPerfQueriesEnable;
bool bEFBCopyEnable;
bool bEFBEmulateFormatChanges;
bool bCopyEFBToTexture;
bool bSkipEFBCopyToRam;
bool bCopyEFBScaled;
int iSafeTextureCache_ColorSamples;
int iPhackvalue[3];
@ -165,8 +164,6 @@ struct VideoConfig final
// Utility
bool RealXFBEnabled() const { return bUseXFB && bUseRealXFB; }
bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; }
bool EFBCopiesToTextureEnabled() const { return bEFBCopyEnable && bCopyEFBToTexture; }
bool EFBCopiesToRamEnabled() const { return bEFBCopyEnable && !bCopyEFBToTexture; }
bool ExclusiveFullscreenEnabled() const { return backend_info.bSupportsExclusiveFullscreen && !bBorderlessFullscreen; }
};