From 0d9eca8668eeeded83a174c181bf69b81270e494 Mon Sep 17 00:00:00 2001 From: "sudonim1@gmail.com" Date: Tue, 19 Jun 2012 00:35:42 +0000 Subject: [PATCH] 88GSDX: Removed the "sprite hack" as it should be obsolete, fixed the vertex shader selector key function (the pixel shader was broken in the same way but with the "sprite hack" removed it doesn't matter now). git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5310 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSDeviceDX.h | 3 +-- plugins/GSdx/GSRendererDX.cpp | 1 - plugins/GSdx/GSSettingsDlg.cpp | 7 ------- plugins/GSdx/GSTextureCache.cpp | 11 ----------- plugins/GSdx/GSTextureCache.h | 2 -- plugins/GSdx/GSTextureFX11.cpp | 4 +--- plugins/GSdx/GSTextureFX9.cpp | 4 +--- plugins/GSdx/GSdx.rc | 5 ++--- plugins/GSdx/res/tfx.fx | 3 --- plugins/GSdx/resource.h | 1 - 10 files changed, 5 insertions(+), 36 deletions(-) diff --git a/plugins/GSdx/GSDeviceDX.h b/plugins/GSdx/GSDeviceDX.h index 84b76b0190..697bfe8398 100644 --- a/plugins/GSdx/GSDeviceDX.h +++ b/plugins/GSdx/GSDeviceDX.h @@ -82,7 +82,7 @@ public: uint32 key; }; - operator uint32() {return key & 0x3f;} + operator uint32() {return key & 0xff;} VSSelector() : key(0) {} }; @@ -174,7 +174,6 @@ public: uint32 ltf:1; uint32 colclip:2; uint32 date:2; - uint32 spritehack:1; }; uint32 key; diff --git a/plugins/GSdx/GSRendererDX.cpp b/plugins/GSdx/GSRendererDX.cpp index 6c75f7e06b..4592ab5956 100644 --- a/plugins/GSdx/GSRendererDX.cpp +++ b/plugins/GSdx/GSRendererDX.cpp @@ -294,7 +294,6 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc ps_sel.tcc = context->TEX0.TCC; ps_sel.ltf = bilinear && !(ps_sel.fmt <= 2 && ps_sel.wms < 3 && ps_sel.wmt < 3); ps_sel.rt = tex->m_target; - ps_sel.spritehack = tex->m_spritehack_t; int w = tex->m_texture->GetWidth(); int h = tex->m_texture->GetHeight(); diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index 357b3d217b..e1c8abb47a 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -420,7 +420,6 @@ void GSHacksDlg::OnInit() CheckDlgButton(m_hWnd, IDC_ALPHAHACK, theApp.GetConfig("UserHacks_AlphaHack", 0)); CheckDlgButton(m_hWnd, IDC_OFFSETHACK, theApp.GetConfig("UserHacks_HalfPixelOffset", 0)); - CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 0)); CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0)); CheckDlgButton(m_hWnd, IDC_AGGRESSIVECRC, theApp.GetConfig("UserHacks_AggressiveCRC", 0)); CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 0)); @@ -470,11 +469,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) case IDC_OFFSETHACK: helpstr = "Halfpixel\n\nMight fix some misaligned fog, bloom, or blend effect."; break; - case IDC_SPRITEHACK: - helpstr = "Sprite Hack\n\nHelps getting rid of black inner lines in some filtered sprites." - " Half option is the preferred one. Use it for Mana Khemia or ArTonelico for example." - " Full can be used for Tales of Destiny."; - break; case IDC_WILDHACK: helpstr = "WildArms\n\nLowers the GS precision to avoid gaps between pixels when" " upscaling. Full option fixes the text on WildArms games, while Half option might improve portraits" @@ -518,7 +512,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) theApp.SetConfig("UserHacks_MSAA", cb2msaa[(int)SendMessage(GetDlgItem(m_hWnd, IDC_MSAACB), CB_GETCURSEL, 0, 0)]); theApp.SetConfig("UserHacks_AlphaHack", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHAHACK)); theApp.SetConfig("UserHacks_HalfPixelOffset", (int)IsDlgButtonChecked(m_hWnd, IDC_OFFSETHACK)); - theApp.SetConfig("UserHacks_SpriteHack", (int)IsDlgButtonChecked(m_hWnd, IDC_SPRITEHACK)); theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0)); theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK)); theApp.SetConfig("UserHacks_AggressiveCRC", (int)IsDlgButtonChecked(m_hWnd, IDC_AGGRESSIVECRC)); diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 418a9005c3..7d2561f0a3 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -25,7 +25,6 @@ GSTextureCache::GSTextureCache(GSRenderer* r) : m_renderer(r) { - m_spritehack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_SpriteHack", 0) : 0; UserHacks_HalfPixelOffset = !!theApp.GetConfig("UserHacks", 0) && !!theApp.GetConfig("UserHacks_HalfPixelOffset", 0); @@ -591,16 +590,6 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con bool hack = false; - if(m_spritehack && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT8H)) - { - src->m_spritehack_t = true; - - if(m_spritehack == 2 && TEX0.CPSM != PSM_PSMCT16) - src->m_spritehack_t = false; - } - else - src->m_spritehack_t = false; - if (dst) { // TODO: clean up this mess diff --git a/plugins/GSdx/GSTextureCache.h b/plugins/GSdx/GSTextureCache.h index 904a00494c..fd53f1d1f8 100644 --- a/plugins/GSdx/GSTextureCache.h +++ b/plugins/GSdx/GSTextureCache.h @@ -63,7 +63,6 @@ public: bool m_target; bool m_complete; bool m_repeating; - bool m_spritehack_t; vector* m_p2t; public: @@ -107,7 +106,6 @@ protected: SourceMap m_src; list m_dst[2]; bool m_paltex; - int m_spritehack; uint8* m_temp; virtual Source* CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* t = NULL); diff --git a/plugins/GSdx/GSTextureFX11.cpp b/plugins/GSdx/GSTextureFX11.cpp index 84189a7d85..5e7171b294 100644 --- a/plugins/GSdx/GSTextureFX11.cpp +++ b/plugins/GSdx/GSTextureFX11.cpp @@ -177,7 +177,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe if(i == m_ps.end()) { - string str[16]; + string str[15]; str[0] = format("%d", sel.fst); str[1] = format("%d", sel.wms); @@ -194,7 +194,6 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe str[12] = format("%d", sel.ltf); str[13] = format("%d", sel.colclip); str[14] = format("%d", sel.date); - str[15] = format("%d", sel.spritehack); D3D11_SHADER_MACRO macro[] = { @@ -213,7 +212,6 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe {"PS_LTF", str[12].c_str()}, {"PS_COLCLIP", str[13].c_str()}, {"PS_DATE", str[14].c_str()}, - {"PS_SPRITEHACK", str[15].c_str()}, {NULL, NULL}, }; diff --git a/plugins/GSdx/GSTextureFX9.cpp b/plugins/GSdx/GSTextureFX9.cpp index a8e0d913b3..6173334121 100644 --- a/plugins/GSdx/GSTextureFX9.cpp +++ b/plugins/GSdx/GSTextureFX9.cpp @@ -135,7 +135,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel if(i == m_ps.end()) { - string str[15]; + string str[14]; str[0] = format("%d", sel.fst); str[1] = format("%d", sel.wms); @@ -151,7 +151,6 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel str[11] = format("%d", sel.ltf); str[12] = format("%d", sel.colclip); str[13] = format("%d", sel.date); - str[14] = format("%d", sel.spritehack); D3DXMACRO macro[] = { @@ -169,7 +168,6 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel {"PS_LTF", str[11].c_str()}, {"PS_COLCLIP", str[12].c_str()}, {"PS_DATE", str[13].c_str()}, - {"PS_SPRITEHACK", str[14].c_str()}, {NULL, NULL}, }; diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index 0b4e191fc8..289edd55d2 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -88,12 +88,11 @@ BEGIN CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS,68,35,10,14 CONTROL "Alpha",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,54,34,10 CONTROL "Half-pixel Offset",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,71,65,10 - CONTROL "Sprite",IDC_SPRITEHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,88,35,10 LTEXT "USE AT YOUR OWN RISK!",IDC_STATIC,7,182,84,8,WS_DISABLED COMBOBOX IDC_MSAACB,35,18,44,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,105,64,10 + CONTROL "WildArmsOffset",IDC_WILDHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,14,88,64,10 LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,92,20,209,145 - CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,122,66,10 + CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,105,66,10 CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,157,58,10 END diff --git a/plugins/GSdx/res/tfx.fx b/plugins/GSdx/res/tfx.fx index 7ec53d56aa..fe6d285ea8 100644 --- a/plugins/GSdx/res/tfx.fx +++ b/plugins/GSdx/res/tfx.fx @@ -33,7 +33,6 @@ #define PS_LTF 1 #define PS_COLCLIP 0 #define PS_DATE 0 -#define PS_SPRITEHACK 0 #endif struct VS_INPUT @@ -505,9 +504,7 @@ void atst(float4 c) } else if(PS_ATST == 2) // l { - #if PS_SPRITEHACK == 0 clip(AREF - a); - #endif } else if(PS_ATST == 3) // le { diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index 0e9646696d..c9a81b5de2 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -75,7 +75,6 @@ #define IDC_SKIPDRAWHACKEDIT 2048 #define IDC_STATIC10 2049 #define IDC_HACKDISABLED 2050 -#define IDC_SPRITEHACK 2051 #define IDRESET 2052 #define IDC_SATURATION_SLIDER 2053 #define IDC_BRIGHTNESS_SLIDER 2055