gsdx: drop the auto skip depth hack

Just use 1 in skip draw if you want to use it

openGL code will soon be fixed to support depth correctly (and I hope dx in the future)

Conflicts:
	plugins/GSdx/GSState.cpp
	plugins/GSdx/GSState.h
This commit is contained in:
Gregory Hainaut 2015-06-17 21:17:52 +02:00
parent 263583ebcc
commit b2f8fe3593
6 changed files with 2 additions and 22 deletions

View File

@ -404,7 +404,6 @@ void populate_hack_table(GtkWidget* hack_table)
GtkWidget* hack_tco_entry = CreateTextBox("UserHacks_TCOffset"); GtkWidget* hack_tco_entry = CreateTextBox("UserHacks_TCOffset");
GtkWidget* hack_logz_check = CreateCheckBox("Log Depth Hack", "logz", true); GtkWidget* hack_logz_check = CreateCheckBox("Log Depth Hack", "logz", true);
GtkWidget* align_sprite_check = CreateCheckBox("Align sprite hack", "UserHacks_align_sprite_X"); GtkWidget* align_sprite_check = CreateCheckBox("Align sprite hack", "UserHacks_align_sprite_X");
GtkWidget* auto_skip_check = CreateCheckBox("Auto Skip depth Texture", "UserHacks_AutoSkipDrawDepth");
GtkWidget* hack_sprite_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_SpriteHack"); GtkWidget* hack_sprite_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_SpriteHack");
GtkWidget* hack_sprite_label = gtk_label_new("Alpha-Sprite Hack:"); GtkWidget* hack_sprite_label = gtk_label_new("Alpha-Sprite Hack:");

View File

@ -91,9 +91,6 @@ const char* dialog_message(int ID, bool* updateText) {
return "Corrects the sampling of 2D sprite textures when upscaling.\n\n" return "Corrects the sampling of 2D sprite textures when upscaling.\n\n"
"Fixes lines in sprites of games like Ar tonelico when upscaling.\n\n" "Fixes lines in sprites of games like Ar tonelico when upscaling.\n\n"
"Carries a total of three states: Unchecked (off), Shaded (on for all sprites) and Checked (on for flat sprites)"; "Carries a total of three states: Unchecked (off), Shaded (on for all sprites) and Checked (on for flat sprites)";
case IDC_AUTO_SKIP:
return "Auto-skip draw depth Hack\n\n"
"Fixes red lines for games like GOW and NFS:Underground.";
case IDC_TCOFFSETX: case IDC_TCOFFSETX:
case IDC_TCOFFSETX2: case IDC_TCOFFSETX2:
case IDC_STATIC_TCOFFSETX: case IDC_STATIC_TCOFFSETX:

View File

@ -56,7 +56,6 @@ enum {
IDC_CHECK_DISABLE_ALL_HACKS, IDC_CHECK_DISABLE_ALL_HACKS,
IDC_ALIGN_SPRITE, IDC_ALIGN_SPRITE,
IDC_ROUND_SPRITE, IDC_ROUND_SPRITE,
IDC_AUTO_SKIP,
IDC_TCOFFSETX, IDC_TCOFFSETX,
IDC_TCOFFSETX2, IDC_TCOFFSETX2,
IDC_STATIC_TCOFFSETX, IDC_STATIC_TCOFFSETX,

View File

@ -610,7 +610,6 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfig("UserHacks_AlphaStencil", 0)); CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfig("UserHacks_AlphaStencil", 0));
CheckDlgButton(m_hWnd, IDC_ROUND_SPRITE, theApp.GetConfig("UserHacks_round_sprite_offset", 0)); CheckDlgButton(m_hWnd, IDC_ROUND_SPRITE, theApp.GetConfig("UserHacks_round_sprite_offset", 0));
CheckDlgButton(m_hWnd, IDC_ALIGN_SPRITE, theApp.GetConfig("UserHacks_align_sprite_X", 0)); CheckDlgButton(m_hWnd, IDC_ALIGN_SPRITE, theApp.GetConfig("UserHacks_align_sprite_X", 0));
CheckDlgButton(m_hWnd, IDC_AUTO_SKIP, theApp.GetConfig("UserHacks_AutoSkipDrawDepth", 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0));
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0));
@ -671,7 +670,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("UserHacks_AlphaStencil", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHASTENCIL)); theApp.SetConfig("UserHacks_AlphaStencil", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHASTENCIL));
theApp.SetConfig("UserHacks_round_sprite_offset", (int)IsDlgButtonChecked(m_hWnd, IDC_ROUND_SPRITE)); theApp.SetConfig("UserHacks_round_sprite_offset", (int)IsDlgButtonChecked(m_hWnd, IDC_ROUND_SPRITE));
theApp.SetConfig("Userhacks_align_sprite_X", (int)IsDlgButtonChecked(m_hWnd, IDC_ALIGN_SPRITE)); theApp.SetConfig("Userhacks_align_sprite_X", (int)IsDlgButtonChecked(m_hWnd, IDC_ALIGN_SPRITE));
theApp.SetConfig("UserHacks_AutoSkipDrawDepth",(int)IsDlgButtonChecked(m_hWnd, IDC_AUTO_SKIP));
unsigned int TCOFFSET = SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETX), UDM_GETPOS, 0, 0) & 0xFFFF; unsigned int TCOFFSET = SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETX), UDM_GETPOS, 0, 0) & 0xFFFF;
TCOFFSET |= (SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETY), UDM_GETPOS, 0, 0) & 0xFFFF) << 16; TCOFFSET |= (SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETY), UDM_GETPOS, 0, 0) & 0xFFFF) << 16;

View File

@ -67,7 +67,6 @@ GSState::GSState()
//s_savez = 1; //s_savez = 1;
UserHacks_WildHack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_WildHack", 0) : 0; UserHacks_WildHack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_WildHack", 0) : 0;
UserHacks_AutoSkipDrawDepth = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_AutoSkipDrawDepth", 1) : false;
m_crc_hack_level = theApp.GetConfig("crc_hack_level", 3); m_crc_hack_level = theApp.GetConfig("crc_hack_level", 3);
s_crc_hack_level = m_crc_hack_level; s_crc_hack_level = m_crc_hack_level;
@ -5580,23 +5579,12 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
} }
} }
} }
// Mimic old GSdx behavior (skipping all depth textures with a skip value of 1), to avoid floods of bug reports
// that games are broken, when the user hasn't found the skiphack yet. (God of War, sigh...)
else if ((skip == 0) && UserHacks_AutoSkipDrawDepth)
{
if(fi.TME)
{
if(fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S)
{
skip = 1;
}
}
#ifdef ENABLE_OGL_DEBUG #ifdef ENABLE_OGL_DEBUG
} else if (fi.TME) { else if (fi.TME) {
if(fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S) if(fi.TPSM == PSM_PSMZ32 || fi.TPSM == PSM_PSMZ24 || fi.TPSM == PSM_PSMZ16 || fi.TPSM == PSM_PSMZ16S)
GL_INS("!!! Depth Texture 0x%x!!!", fi.TPSM); GL_INS("!!! Depth Texture 0x%x!!!", fi.TPSM);
#endif
} }
#endif
if(skip > 0) if(skip > 0)
{ {

View File

@ -143,7 +143,6 @@ protected:
bool IsBadFrame(int& skip, int UserHacks_SkipDraw); bool IsBadFrame(int& skip, int UserHacks_SkipDraw);
int UserHacks_WildHack; int UserHacks_WildHack;
bool UserHacks_AutoSkipDrawDepth;
bool isPackedUV_HackFlag; bool isPackedUV_HackFlag;
int m_crc_hack_level; int m_crc_hack_level;