Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Always Depth Write" setting. One step forward for #8171 #9726

Merged
merged 2 commits into from
May 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ static ConfigSetting graphicsSettings[] = {
ReportedConfigSetting("TexDeposterize", &g_Config.bTexDeposterize, false, true, true),
ConfigSetting("VSyncInterval", &g_Config.bVSync, false, true, true),
ReportedConfigSetting("DisableStencilTest", &g_Config.bDisableStencilTest, false, true, true),
ReportedConfigSetting("AlwaysDepthWrite", &g_Config.bAlwaysDepthWrite, false, true, true),
ReportedConfigSetting("BloomHack", &g_Config.iBloomHack, 0, true, true),

// Not really a graphics setting...
Expand Down
1 change: 0 additions & 1 deletion Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ struct Config {
bool bReloadCheats;
int iCwCheatRefreshRate;
bool bDisableStencilTest;
bool bAlwaysDepthWrite;
int iBloomHack; //0 = off, 1 = safe, 2 = balanced, 3 = aggressive
bool bTimerHack;
bool bBlockTransferGPU;
Expand Down
3 changes: 1 addition & 2 deletions GPU/Directx9/StateMappingDX9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ void DrawEngineDX9::ApplyDrawState(int prim) {
}
}

bool alwaysDepthWrite = g_Config.bAlwaysDepthWrite;
bool enableStencilTest = !g_Config.bDisableStencilTest;

{
Expand All @@ -222,7 +221,7 @@ void DrawEngineDX9::ApplyDrawState(int prim) {
dxstate.depthTest.enable();
dxstate.depthFunc.set(D3DCMP_ALWAYS);
dxstate.depthWrite.set(gstate.isClearModeDepthMask());
if (gstate.isClearModeDepthMask() || alwaysDepthWrite) {
if (gstate.isClearModeDepthMask()) {
framebufferManager_->SetDepthUpdated();
}

Expand Down
9 changes: 4 additions & 5 deletions GPU/GLES/StateMappingGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,13 @@ void DrawEngineGLES::ApplyDrawState(int prim) {
}

{
bool alwaysDepthWrite = g_Config.bAlwaysDepthWrite;
bool enableStencilTest = !g_Config.bDisableStencilTest;
if (gstate.isModeClear()) {
// Depth Test
glstate.depthTest.enable();
glstate.depthFunc.set(GL_ALWAYS);
glstate.depthWrite.set(gstate.isClearModeDepthMask() || alwaysDepthWrite ? GL_TRUE : GL_FALSE);
if (gstate.isClearModeDepthMask() || alwaysDepthWrite) {
glstate.depthWrite.set(gstate.isClearModeDepthMask() ? GL_TRUE : GL_FALSE);
if (gstate.isClearModeDepthMask()) {
framebufferManager_->SetDepthUpdated();
}

Expand All @@ -306,8 +305,8 @@ void DrawEngineGLES::ApplyDrawState(int prim) {
if (gstate.isDepthTestEnabled()) {
glstate.depthTest.enable();
glstate.depthFunc.set(compareOps[gstate.getDepthTestFunction()]);
glstate.depthWrite.set(gstate.isDepthWriteEnabled() || alwaysDepthWrite ? GL_TRUE : GL_FALSE);
if (gstate.isDepthWriteEnabled() || alwaysDepthWrite) {
glstate.depthWrite.set(gstate.isDepthWriteEnabled() ? GL_TRUE : GL_FALSE);
if (gstate.isDepthWriteEnabled()) {
framebufferManager_->SetDepthUpdated();
}
} else {
Expand Down
3 changes: 0 additions & 3 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,6 @@ void GameSettingsScreen::CreateViews() {
CheckBox *stencilTest = graphicsSettings->Add(new CheckBox(&g_Config.bDisableStencilTest, gr->T("Disable Stencil Test")));
stencilTest->SetDisabledPtr(&g_Config.bSoftwareRendering);

CheckBox *depthWrite = graphicsSettings->Add(new CheckBox(&g_Config.bAlwaysDepthWrite, gr->T("Always Depth Write")));
depthWrite->SetDisabledPtr(&g_Config.bSoftwareRendering);

static const char *bloomHackOptions[] = { "Off", "Safe", "Balanced", "Aggressive" };
PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gr->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gr->GetName(), screenManager()));
bloomHackEnable_ = !g_Config.bSoftwareRendering && (g_Config.iInternalResolution != 1);
Expand Down