Skip to content

Commit

Permalink
VideoCommon: Drop "Disable destAlpha" hack
Browse files Browse the repository at this point in the history
This option has no use any more, neither performance nor driver workaround.
  • Loading branch information
degasus committed Sep 9, 2015
1 parent 38d05cd commit f6054c1
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion Data/Sys/GameSettings/GLC.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ EmulationStateId = 4

[Video_Settings]
SafeTextureCacheColorSamples = 512
DstAlphaPass = True

[Video_Hacks]
EFBToTextureEnable = True
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/DolphinWX/VideoConfigDiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ static wxString skip_efb_copy_to_ram_desc = wxTRANSLATE("Stores EFB Copies exclu
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.");
static wxString disable_dstalpha_desc = wxTRANSLATE("Disables emulation of a hardware feature called destination alpha, which is used in many games for various graphical effects.\nThis has no performance impact on D3D and desktop OpenGL, but on OpenGL ES this is rendered in two passes, which has a minor but noticeable performance impact.\n\nIf unsure, leave this unchecked.");
static wxString show_fps_desc = wxTRANSLATE("Show the number of frames rendered per second as a measure of emulation speed.\n\nIf unsure, leave this unchecked.");
static wxString log_render_time_to_file_desc = wxTRANSLATE("Log the render time of every frame to User/Logs/render_time.txt. Use this feature when you want to measure the performance of Dolphin.\n\nIf unsure, leave this unchecked.");
static wxString show_stats_desc = wxTRANSLATE("Show various rendering statistics.\n\nIf unsure, leave this unchecked.");
Expand Down Expand Up @@ -520,7 +519,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// - other hacks
{
wxGridSizer* const szr_other = new wxGridSizer(2, 5, 5);
szr_other->Add(CreateCheckBox(page_hacks, _("Disable Destination Alpha"), wxGetTranslation(disable_dstalpha_desc), vconfig.bDstAlphaPass));
szr_other->Add(CreateCheckBox(page_hacks, _("Fast Depth Calculation"), wxGetTranslation(fast_depth_calc_desc), vconfig.bFastDepthCalc));
szr_other->Add(CreateCheckBox(page_hacks, _("Disable Bounding Box"), wxGetTranslation(disable_bbox_desc), vconfig.bBBoxEnable, true));

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/OGL/Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
// Example: D3DBLEND_DESTALPHA needs to be D3DBLEND_ONE since the result without an alpha channel is assumed to always be 1.
bool target_has_alpha = bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24;

bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && target_has_alpha;
bool useDstAlpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && target_has_alpha;
bool useDualSource = useDstAlpha && g_ActiveConfig.backend_info.bSupportsDualSourceBlend;

const GLenum glSrcFactors[8] =
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/Debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path)
const std::string filename = StringFromFormat("%sdump_ps.txt", path.c_str());

std::string output;
bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24;
bool useDstAlpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24;
if (!useDstAlpha)
{
output = "Destination alpha disabled:\n";
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/VideoCommon/VertexManagerBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ void VertexManager::Flush()
GeometryShaderManager::SetConstants();
PixelShaderManager::SetConstants();

bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass &&
bpmem.dstalpha.enable &&
bool useDstAlpha = bpmem.dstalpha.enable &&
bpmem.blendmode.alphaupdate &&
bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24;

Expand Down
3 changes: 0 additions & 3 deletions Source/Core/VideoCommon/VideoConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ void VideoConfig::Load(const std::string& ini_file)
settings->Get("MSAA", &iMultisampleMode, 0);
settings->Get("SSAA", &bSSAA, false);
settings->Get("EFBScale", &iEFBScale, (int)SCALE_1X); // native
settings->Get("DstAlphaPass", &bDstAlphaPass, false);
settings->Get("TexFmtOverlayEnable", &bTexFmtOverlayEnable, 0);
settings->Get("TexFmtOverlayCenter", &bTexFmtOverlayCenter, 0);
settings->Get("WireFrame", &bWireFrame, 0);
Expand Down Expand Up @@ -191,7 +190,6 @@ void VideoConfig::GameIniLoad()
}
}

CHECK_SETTING("Video_Settings", "DstAlphaPass", bDstAlphaPass);
CHECK_SETTING("Video_Settings", "DisableFog", bDisableFog);

CHECK_SETTING("Video_Enhancements", "ForceFiltering", bForceFiltering);
Expand Down Expand Up @@ -282,7 +280,6 @@ void VideoConfig::Save(const std::string& ini_file)
settings->Set("TexFmtOverlayEnable", bTexFmtOverlayEnable);
settings->Set("TexFmtOverlayCenter", bTexFmtOverlayCenter);
settings->Set("Wireframe", bWireFrame);
settings->Set("DstAlphaPass", bDstAlphaPass);
settings->Set("DisableFog", bDisableFog);
settings->Set("EnableShaderDebugging", bEnableShaderDebugging);
settings->Set("BorderlessFullscreen", bBorderlessFullscreen);
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoCommon/VideoConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ struct VideoConfig final

// Render
bool bWireFrame;
bool bDstAlphaPass;
bool bDisableFog;

// Utility
Expand Down

0 comments on commit f6054c1

Please sign in to comment.