diff --git a/plugins/GSdx/GSDevice11.cpp b/plugins/GSdx/GSDevice11.cpp index 4ae8cb3d7a..24730e3225 100644 --- a/plugins/GSdx/GSDevice11.cpp +++ b/plugins/GSdx/GSDevice11.cpp @@ -33,9 +33,7 @@ GSDevice11::GSDevice11() FXAA_Compiled = false; ExShader_Compiled = false; - - UserHacks_NVIDIAHack = !!theApp.GetConfig("UserHacks_NVIDIAHack", 0) && !!theApp.GetConfig("UserHacks", 0); - + m_state.topology = D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED; m_state.bf = -1; } @@ -660,19 +658,9 @@ void GSDevice11::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* {GSVector4(left, bottom, 0.5f, 1.0f), GSVector2(sRect.x, sRect.w)}, {GSVector4(right, bottom, 0.5f, 1.0f), GSVector2(sRect.z, sRect.w)}, }; - - /* NVIDIA HACK!!!! - For some reason this function ball's up on drivers after 320.18 causing a weird stretching issue. - The only way around this seems to be adding a small value to the x, y coords for part of the - vertex data but doing it only on the first vertex of the 4 seems to do it (it doesn't seem to matter)*/ - if(UserHacks_NVIDIAHack) - { - //Smallest value i could get away with before it starts stretching again :( - vertices[0].p.x += 0.000002f; - vertices[0].p.y += 0.000002f; - } - /*END OF HACK*/ - + + + IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices)); IASetInputLayout(m_convert.il); IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); @@ -681,9 +669,21 @@ void GSDevice11::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* VSSetShader(m_convert.vs, NULL); - // gs - GSSetShader(NULL); + // gs + /* NVIDIA HACK!!!! + Not sure why, but having the Geometry shader disabled causes the strange stretching in recent drivers*/ + + GSSelector sel; + sel.iip = 0; //Don't use shading for stretching, we're just passing through + sel.prim = 2; //Triangle Strip + SetupGS(sel); + + //old code - GSSetShader(NULL); + + /*END OF HACK*/ + + // // ps diff --git a/plugins/GSdx/GSDevice11.h b/plugins/GSdx/GSDevice11.h index a9dc679d63..b3137a3786 100644 --- a/plugins/GSdx/GSDevice11.h +++ b/plugins/GSdx/GSDevice11.h @@ -87,7 +87,6 @@ public: // TODO bool FXAA_Compiled; bool ExShader_Compiled; - bool UserHacks_NVIDIAHack; struct { diff --git a/plugins/GSdx/GSSetting.cpp b/plugins/GSdx/GSSetting.cpp index 129757479d..f37e8136f0 100644 --- a/plugins/GSdx/GSSetting.cpp +++ b/plugins/GSdx/GSSetting.cpp @@ -62,11 +62,6 @@ const char* dialog_message(int ID, bool* updateText) { return "Extend stencil based emulation of destination alpha to perform stencil operations while drawing.\n\n" "Improves many shadows which are normally overdrawn in parts, may affect other effects.\n" "Will disable partial transparency in some games or even prevent drawing some elements altogether."; - case IDC_CHECK_NVIDIA_HACK: - return "This is a hack to work around problems with recent NVIDIA drivers causing odd stretching problems in DirectX 11 only " - "when using Upscaling.\n\n" - "Try not to use this unless your game Videos or 2D screens are stretching outside the frame.\n\n" - "If you have an AMD/ATi graphics card you should not need this."; case IDC_CHECK_DISABLE_ALL_HACKS: return "FOR TESTING ONLY!!\n\n" "Disable all CRC hacks - will break many games. Overrides CrcHacksExclusion at gsdx.ini\n" diff --git a/plugins/GSdx/GSSetting.h b/plugins/GSdx/GSSetting.h index eb6fcbdecd..37c477e08a 100644 --- a/plugins/GSdx/GSSetting.h +++ b/plugins/GSdx/GSSetting.h @@ -53,7 +53,6 @@ enum { IDC_STATIC_MSAA, IDC_AGGRESSIVECRC, IDC_ALPHASTENCIL, - IDC_CHECK_NVIDIA_HACK, IDC_CHECK_DISABLE_ALL_HACKS, IDC_ALIGN_SPRITE, IDC_ROUND_SPRITE, diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index 9903864f96..de4ea303c2 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -599,7 +599,6 @@ void GSHacksDlg::OnInit() CheckDlgButton(m_hWnd, IDC_WILDHACK, theApp.GetConfig("UserHacks_WildHack", 0)); CheckDlgButton(m_hWnd, IDC_AGGRESSIVECRC, theApp.GetConfig("UserHacks_AggressiveCRC", 0)); CheckDlgButton(m_hWnd, IDC_ALPHASTENCIL, theApp.GetConfig("UserHacks_AlphaStencil", 0)); - CheckDlgButton(m_hWnd, IDC_CHECK_NVIDIA_HACK, theApp.GetConfig("UserHacks_NVIDIAHack", 0)); CheckDlgButton(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS, theApp.GetConfig("UserHacks_DisableCrcHacks", 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)); @@ -663,7 +662,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) theApp.SetConfig("UserHacks_WildHack", (int)IsDlgButtonChecked(m_hWnd, IDC_WILDHACK)); theApp.SetConfig("UserHacks_AggressiveCRC", (int)IsDlgButtonChecked(m_hWnd, IDC_AGGRESSIVECRC)); theApp.SetConfig("UserHacks_AlphaStencil", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHASTENCIL)); - theApp.SetConfig("UserHacks_NVIDIAHack", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_NVIDIA_HACK)); theApp.SetConfig("UserHacks_DisableCrcHacks", (int)IsDlgButtonChecked(m_hWnd, IDC_CHECK_DISABLE_ALL_HACKS)); 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)); diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index c3c445cf78..894ea44c98 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -28,7 +28,6 @@ GSTextureCache::GSTextureCache(GSRenderer* r) m_spritehack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_SpriteHack", 0) : 0; UserHacks_HalfPixelOffset = !!theApp.GetConfig("UserHacks", 0) && !!theApp.GetConfig("UserHacks_HalfPixelOffset", 0); - UserHacks_NVIDIAHack = !!theApp.GetConfig("UserHacks_NVIDIAHack", 0) && !!theApp.GetConfig("UserHacks", 0); m_paltex = !!theApp.GetConfig("paltex", 0); m_temp = (uint8*)_aligned_malloc(1024 * 1024 * sizeof(uint32), 32); @@ -245,15 +244,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int if(ww > 0 && hh > 0) { - if(UserHacks_NVIDIAHack) - { - //Nvidia hackage!! to revert to original remove both " - 0.01f"'s - dst->m_texture->SetScale(GSVector2((float)w / ww - 0.01f, (float)h / hh - 0.01f)); - } - else - { - dst->m_texture->SetScale(GSVector2((float)w / ww, (float)h / hh)); - } + dst->m_texture->SetScale(GSVector2((float)w / ww, (float)h / hh)); } } } diff --git a/plugins/GSdx/GSTextureCache.h b/plugins/GSdx/GSTextureCache.h index ccaf76e151..a4292acfc5 100644 --- a/plugins/GSdx/GSTextureCache.h +++ b/plugins/GSdx/GSTextureCache.h @@ -28,7 +28,6 @@ class GSTextureCache { public: enum {RenderTarget, DepthStencil}; - bool UserHacks_NVIDIAHack; class Surface : public GSAlignedClass<32> { diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index 571b60b15c..99c6997527 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -110,17 +110,16 @@ BEGIN LTEXT "TEXT_GOES_HERE",IDC_HACK_DESCRIPTION,102,20,199,192 CONTROL "Aggressive-CRC",IDC_AGGRESSIVECRC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,119,66,10 CONTROL "Alpha Stencil",IDC_ALPHASTENCIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,136,66,10 - CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,168,58,10 - CONTROL "Round Sprite",IDC_ROUND_SPRITE,"Button",BS_AUTO3STATE | WS_TABSTOP,14,184,66,10 - CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,200,60,10 - CONTROL "Auto-skip depth",IDC_AUTO_SKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,216,62,10 + CONTROL "Disable CRCs",IDC_CHECK_DISABLE_ALL_HACKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,152,58,10 + CONTROL "Round Sprite",IDC_ROUND_SPRITE,"Button",BS_AUTO3STATE | WS_TABSTOP,14,168,66,10 + CONTROL "Align Sprite",IDC_ALIGN_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,184,60,10 + CONTROL "Auto-skip depth",IDC_AUTO_SKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,200,62,10 LTEXT "TC Offset X",IDC_STATIC_TCOFFSETX,14,234,37,8 EDITTEXT IDC_TCOFFSETX2,53,232,35,14,ES_RIGHT | ES_AUTOHSCROLL CONTROL "",IDC_TCOFFSETX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,232,11,14 EDITTEXT IDC_TCOFFSETY2,53,249,35,14,ES_RIGHT | ES_AUTOHSCROLL CONTROL "",IDC_TCOFFSETY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,86,249,11,14 LTEXT "TC Offset Y",IDC_STATIC_TCOFFSETY,14,251,37,8 - CONTROL "NVIDIA Hack",IDC_CHECK_NVIDIA_HACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,152,57,10 END IDD_SHADEBOOST DIALOGEX 0, 0, 316, 129 diff --git a/plugins/GSdx/resource.h b/plugins/GSdx/resource.h index 9d5c975b32..fa4e7a6dfd 100644 --- a/plugins/GSdx/resource.h +++ b/plugins/GSdx/resource.h @@ -69,7 +69,6 @@ #define IDC_TCOFFSETY 2084 #define IDC_TCOFFSETY2 2085 #define IDC_FXAA 2086 -#define IDC_CHECK_NVIDIA_HACK 2087 #define IDC_SHADER_FX 2088 #define IDC_ANISOTROPIC 2089 #define IDC_AFCOMBO 2090