Merge pull request #3012 from degasus/destAlpha

VideoCommon: Drop "Disable destAlpha" hack
This commit is contained in:
Ryan Houdek 2015-09-10 13:56:43 -04:00
commit 3014feedc8
9 changed files with 4 additions and 23 deletions

View File

@ -21,7 +21,6 @@ EmulationStateId = 4
[Video_Settings] [Video_Settings]
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512
DstAlphaPass = True
[Video_Hacks] [Video_Hacks]
EFBToTextureEnable = True EFBToTextureEnable = True

View File

@ -110,7 +110,6 @@ public final class UserPreferences
editor.putString("externalFrameBuffer", "Real"); editor.putString("externalFrameBuffer", "Real");
} }
editor.putBoolean("disableDestinationAlpha", getConfig("gfx_opengl.ini", "Settings", "DstAlphaPass", "False").equals("True"));
editor.putBoolean("fastDepthCalculation", getConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", "True").equals("True")); editor.putBoolean("fastDepthCalculation", getConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", "True").equals("True"));
editor.putString("aspectRatio", getConfig("gfx_opengl.ini", "Settings", "AspectRatio", "0")); editor.putString("aspectRatio", getConfig("gfx_opengl.ini", "Settings", "AspectRatio", "0"));
@ -166,9 +165,6 @@ public final class UserPreferences
// External frame buffer emulation. Falls back to disabled upon error. // External frame buffer emulation. Falls back to disabled upon error.
String externalFrameBuffer = prefs.getString("externalFrameBuffer", "Disabled"); String externalFrameBuffer = prefs.getString("externalFrameBuffer", "Disabled");
// Whether or not to disable destination alpha.
boolean disableDstAlphaPass = prefs.getBoolean("disableDestinationAlpha", false);
// Whether or not to use fast depth calculation. // Whether or not to use fast depth calculation.
boolean useFastDepthCalc = prefs.getBoolean("fastDepthCalculation", true); boolean useFastDepthCalc = prefs.getBoolean("fastDepthCalculation", true);
@ -275,7 +271,6 @@ public final class UserPreferences
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "UseRealXFB", "True"); NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "UseRealXFB", "True");
} }
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "DstAlphaPass", disableDstAlphaPass ? "True" : "False");
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", useFastDepthCalc ? "True" : "False"); NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "FastDepthCalc", useFastDepthCalc ? "True" : "False");
//-- Enhancement Settings --// //-- Enhancement Settings --//

View File

@ -1030,12 +1030,6 @@
<!-- Other Hacks --> <!-- Other Hacks -->
<PreferenceCategory android:title="@string/other"> <PreferenceCategory android:title="@string/other">
<CheckBoxPreference
android:defaultValue="false"
android:key="disableDestinationAlpha"
android:summary="@string/disable_destination_alpha_descrip"
android:title="@string/disable_destination_alpha"/>
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="fastDepthCalculation" android:key="fastDepthCalculation"
@ -1066,4 +1060,4 @@
</PreferenceCategory> </PreferenceCategory>
<!-- TODO Add the About information here too. --> <!-- TODO Add the About information here too. -->
</PreferenceScreen> </PreferenceScreen>

View File

@ -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 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 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_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 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 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."); static wxString show_stats_desc = wxTRANSLATE("Show various rendering statistics.\n\nIf unsure, leave this unchecked.");
@ -520,7 +519,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// - other hacks // - other hacks
{ {
wxGridSizer* const szr_other = new wxGridSizer(2, 5, 5); 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, _("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)); szr_other->Add(CreateCheckBox(page_hacks, _("Disable Bounding Box"), wxGetTranslation(disable_bbox_desc), vconfig.bBBoxEnable, true));

View File

@ -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. // 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 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; bool useDualSource = useDstAlpha && g_ActiveConfig.backend_info.bSupportsDualSourceBlend;
const GLenum glSrcFactors[8] = const GLenum glSrcFactors[8] =

View File

@ -82,7 +82,7 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path)
const std::string filename = StringFromFormat("%sdump_ps.txt", path.c_str()); const std::string filename = StringFromFormat("%sdump_ps.txt", path.c_str());
std::string output; 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) if (!useDstAlpha)
{ {
output = "Destination alpha disabled:\n"; output = "Destination alpha disabled:\n";

View File

@ -250,8 +250,7 @@ void VertexManager::Flush()
GeometryShaderManager::SetConstants(); GeometryShaderManager::SetConstants();
PixelShaderManager::SetConstants(); PixelShaderManager::SetConstants();
bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bool useDstAlpha = bpmem.dstalpha.enable &&
bpmem.dstalpha.enable &&
bpmem.blendmode.alphaupdate && bpmem.blendmode.alphaupdate &&
bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24; bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24;

View File

@ -80,7 +80,6 @@ void VideoConfig::Load(const std::string& ini_file)
settings->Get("MSAA", &iMultisampleMode, 0); settings->Get("MSAA", &iMultisampleMode, 0);
settings->Get("SSAA", &bSSAA, false); settings->Get("SSAA", &bSSAA, false);
settings->Get("EFBScale", &iEFBScale, (int)SCALE_1X); // native settings->Get("EFBScale", &iEFBScale, (int)SCALE_1X); // native
settings->Get("DstAlphaPass", &bDstAlphaPass, false);
settings->Get("TexFmtOverlayEnable", &bTexFmtOverlayEnable, 0); settings->Get("TexFmtOverlayEnable", &bTexFmtOverlayEnable, 0);
settings->Get("TexFmtOverlayCenter", &bTexFmtOverlayCenter, 0); settings->Get("TexFmtOverlayCenter", &bTexFmtOverlayCenter, 0);
settings->Get("WireFrame", &bWireFrame, 0); settings->Get("WireFrame", &bWireFrame, 0);
@ -191,7 +190,6 @@ void VideoConfig::GameIniLoad()
} }
} }
CHECK_SETTING("Video_Settings", "DstAlphaPass", bDstAlphaPass);
CHECK_SETTING("Video_Settings", "DisableFog", bDisableFog); CHECK_SETTING("Video_Settings", "DisableFog", bDisableFog);
CHECK_SETTING("Video_Enhancements", "ForceFiltering", bForceFiltering); CHECK_SETTING("Video_Enhancements", "ForceFiltering", bForceFiltering);
@ -282,7 +280,6 @@ void VideoConfig::Save(const std::string& ini_file)
settings->Set("TexFmtOverlayEnable", bTexFmtOverlayEnable); settings->Set("TexFmtOverlayEnable", bTexFmtOverlayEnable);
settings->Set("TexFmtOverlayCenter", bTexFmtOverlayCenter); settings->Set("TexFmtOverlayCenter", bTexFmtOverlayCenter);
settings->Set("Wireframe", bWireFrame); settings->Set("Wireframe", bWireFrame);
settings->Set("DstAlphaPass", bDstAlphaPass);
settings->Set("DisableFog", bDisableFog); settings->Set("DisableFog", bDisableFog);
settings->Set("EnableShaderDebugging", bEnableShaderDebugging); settings->Set("EnableShaderDebugging", bEnableShaderDebugging);
settings->Set("BorderlessFullscreen", bBorderlessFullscreen); settings->Set("BorderlessFullscreen", bBorderlessFullscreen);

View File

@ -96,7 +96,6 @@ struct VideoConfig final
// Render // Render
bool bWireFrame; bool bWireFrame;
bool bDstAlphaPass;
bool bDisableFog; bool bDisableFog;
// Utility // Utility