From 847b57907e627149c2305a5904d88b89469290e1 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 10 Apr 2016 17:30:49 +0200 Subject: [PATCH] Revert "gsdx-ogl: add a new hack to force anisotropic filtering" This reverts commit 53690cf9d06b8e1883bfdb487ad837f1d98b0a21. Quoting user: For aliasing, the option allow of reduce a little but always very visible compared with DX11 even with anisotropic OFF, , furthermore many textures bug added with option activated (predictable but not see on DX11 with anisotropic ON). TL;DR doesn't worth it. Note: it seem to work on DX because DX uses HW texturing in clamp region mode (and others invalid case). OpenGL uses SW texturing to ensure accuracy --- plugins/GSdx/GSLinuxDialog.cpp | 4 +--- plugins/GSdx/GSRendererOGL.cpp | 7 +++---- plugins/GSdx/GSRendererOGL.h | 5 ++--- plugins/GSdx/GSSetting.cpp | 3 --- plugins/GSdx/GSSetting.h | 1 - 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index 75d7afd56..b2998f267 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -339,7 +339,6 @@ void populate_hack_table(GtkWidget* hack_table) GtkWidget* hack_safe_fbmask = CreateCheckBox("Safe Accurate Blending", "UserHacks_safe_fbmask"); GtkWidget* hack_fast_inv = CreateCheckBox("Fast Texture Invalidation", "UserHacks_DisablePartialInvalidation"); GtkWidget* hack_depth_check = CreateCheckBox("Disable Depth Emulation", "UserHacks_DisableDepthSupport"); - GtkWidget* hack_force_aniso = CreateCheckBox("Force Anisotropic Filtering", "UserHacks_ForceAniso"); GtkWidget* hack_sprite_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_SpriteHack"); GtkWidget* hack_sprite_label = left_label("Alpha-Sprite Hack:"); @@ -361,7 +360,6 @@ void populate_hack_table(GtkWidget* hack_table) AddTooltip(hack_safe_fbmask, IDC_SAFE_FBMASK); AddTooltip(hack_fast_inv, IDC_FAST_TC_INV); AddTooltip(hack_depth_check, IDC_TC_DEPTH); - AddTooltip(hack_force_aniso, IDC_FORCE_ANISO); s_table_line = 0; @@ -369,7 +367,7 @@ void populate_hack_table(GtkWidget* hack_table) InsertWidgetInTable(hack_table , hack_wild_check , align_sprite_check); InsertWidgetInTable(hack_table , hack_offset_check , preload_gs_check); InsertWidgetInTable(hack_table , hack_safe_fbmask , hack_fast_inv); - InsertWidgetInTable(hack_table , hack_depth_check , hack_force_aniso); + InsertWidgetInTable(hack_table , hack_depth_check); InsertWidgetInTable(hack_table , hack_sprite_label , hack_sprite_box ); InsertWidgetInTable(hack_table , stretch_hack_label , stretch_hack_box ); InsertWidgetInTable(hack_table , hack_skipdraw_label , hack_skipdraw_spin); diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index e59bc26d4..1bbf3a0a9 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -27,10 +27,9 @@ GSRendererOGL::GSRendererOGL() : GSRendererHW(new GSTextureCacheOGL(this)) { - m_accurate_date = theApp.GetConfig("accurate_date", 0); - m_sw_blending = theApp.GetConfig("accurate_blending_unit", 1); + m_accurate_date = theApp.GetConfig("accurate_date", 0); - m_force_aniso = theApp.GetConfig("UserHacks", 0) && theApp.GetConfig("UserHacks_ForceAniso", 0); + m_sw_blending = theApp.GetConfig("accurate_blending_unit", 1); // Hope nothing requires too many draw calls. m_drawlist.reserve(2048); @@ -988,7 +987,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour ps_ssel.tau = (m_context->CLAMP.WMS != CLAMP_CLAMP); ps_ssel.tav = (m_context->CLAMP.WMT != CLAMP_CLAMP); ps_ssel.ltf = bilinear && simple_sample; - ps_ssel.aniso = simple_sample || (m_force_aniso && !tex->m_palette); + ps_ssel.aniso = simple_sample; // Setup Texture ressources dev->SetupSampler(ps_ssel); diff --git a/plugins/GSdx/GSRendererOGL.h b/plugins/GSdx/GSRendererOGL.h index 97f65fdd0..dd6c7eab6 100644 --- a/plugins/GSdx/GSRendererOGL.h +++ b/plugins/GSdx/GSRendererOGL.h @@ -46,10 +46,9 @@ class GSRendererOGL final : public GSRendererHW private: bool m_accurate_date; - int m_sw_blending; - bool m_force_aniso; - bool m_unsafe_fbmask; + int m_sw_blending; PRIM_OVERLAP m_prim_overlap; + bool m_unsafe_fbmask; vector m_drawlist; unsigned int UserHacks_TCOffset; diff --git a/plugins/GSdx/GSSetting.cpp b/plugins/GSdx/GSSetting.cpp index 78d4b6fa7..70766ffc8 100644 --- a/plugins/GSdx/GSSetting.cpp +++ b/plugins/GSdx/GSSetting.cpp @@ -137,9 +137,6 @@ const char* dialog_message(int ID, bool* updateText) { case IDC_FAST_TC_INV: return "By default, the texture cache handles partial invalidations. Unfortunately it is very costly to compute CPU wise." "\n\nThis hack replaces the partial invalidation with a complete deletion of the texture to reduce the CPU load.\n\nIt helps snowblind engine game."; - case IDC_FORCE_ANISO: - return "Force Anisotropic filtering even when it will be mathematically incorrect.\n" - "It helps to remove aliasing but it can create glitches around texture boundaries"; #endif default: if (updateText) diff --git a/plugins/GSdx/GSSetting.h b/plugins/GSdx/GSSetting.h index 6e13a9b54..ba47d9281 100644 --- a/plugins/GSdx/GSSetting.h +++ b/plugins/GSdx/GSSetting.h @@ -74,6 +74,5 @@ enum { IDC_MIPMAP, IDC_PRELOAD_GS, IDC_FAST_TC_INV, - IDC_FORCE_ANISO, }; #endif