diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index cdd38ba338..b2998f2673 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -235,7 +235,6 @@ void populate_hw_table(GtkWidget* hw_table) GtkWidget* paltex_check = CreateCheckBox("Allow 8 bits textures", "paltex"); GtkWidget* acc_date_check = CreateCheckBox("Accurate Date", "accurate_date", false); - GtkWidget* tc_depth_check = CreateCheckBox("Full Depth Emulation", "texture_cache_depth", true); GtkWidget* acc_bld_label = left_label("Blending Unit Accuracy:"); GtkWidget* acc_bld_combo_box = CreateComboBoxFromVector(theApp.m_gs_acc_blend_level, "accurate_blending_unit", 1); @@ -245,18 +244,16 @@ void populate_hw_table(GtkWidget* hw_table) AddTooltip(acc_date_check, IDC_ACCURATE_DATE); AddTooltip(crc_label, crc_combo_box, IDC_CRC_LEVEL); AddTooltip(acc_bld_label, acc_bld_combo_box, IDC_ACCURATE_BLEND_UNIT); - AddTooltip(tc_depth_check, IDC_TC_DEPTH); AddTooltip(filter_label, filter_combo_box, IDC_FILTER); AddTooltip(af_label, af_combo_box, IDC_AFCOMBO); s_table_line = 0; - InsertWidgetInTable(hw_table, paltex_check, tc_depth_check); - InsertWidgetInTable(hw_table, acc_date_check); - InsertWidgetInTable(hw_table, fsaa_label, fsaa_combo_box); - InsertWidgetInTable(hw_table, filter_label, filter_combo_box); - InsertWidgetInTable(hw_table, af_label, af_combo_box); - InsertWidgetInTable(hw_table, acc_bld_label, acc_bld_combo_box); - InsertWidgetInTable(hw_table, crc_label, crc_combo_box); + InsertWidgetInTable(hw_table , paltex_check , acc_date_check); + InsertWidgetInTable(hw_table , fsaa_label , fsaa_combo_box); + InsertWidgetInTable(hw_table , filter_label , filter_combo_box); + InsertWidgetInTable(hw_table , af_label , af_combo_box); + InsertWidgetInTable(hw_table , acc_bld_label , acc_bld_combo_box); + InsertWidgetInTable(hw_table , crc_label , crc_combo_box); } void populate_gl_table(GtkWidget* gl_table) @@ -341,6 +338,7 @@ void populate_hack_table(GtkWidget* hack_table) GtkWidget* preload_gs_check = CreateCheckBox("Preload Frame", "preload_frame_with_gs_data"); 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_sprite_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_SpriteHack"); GtkWidget* hack_sprite_label = left_label("Alpha-Sprite Hack:"); @@ -361,6 +359,7 @@ void populate_hack_table(GtkWidget* hack_table) AddTooltip(preload_gs_check, IDC_PRELOAD_GS); AddTooltip(hack_safe_fbmask, IDC_SAFE_FBMASK); AddTooltip(hack_fast_inv, IDC_FAST_TC_INV); + AddTooltip(hack_depth_check, IDC_TC_DEPTH); s_table_line = 0; @@ -368,6 +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); 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/GSSetting.cpp b/plugins/GSdx/GSSetting.cpp index 74c54eb411..70766ffc84 100644 --- a/plugins/GSdx/GSSetting.cpp +++ b/plugins/GSdx/GSSetting.cpp @@ -95,7 +95,7 @@ const char* dialog_message(int ID, bool* updateText) { return "Implement a more accurate algorithm to compute GS destination alpha testing.\n\n" "It could be slower when the effects are used.\n\nNote: it requires the OpenGL 4.2 extension GL_ARB_shader_image_load_store."; case IDC_ACCURATE_BLEND_UNIT: - return "Control the accuracy level of the GS blending unit emulation. Note: it requires OpenGL 4.5 driver support.\n\n" + return "Control the accuracy level of the GS blending unit emulation.\n\n" "None:\nFast but introduce various rendering issues. It is intended for slow computer.\n\n" "Basic:\nEmulate correctly most of the effects with a limited speed penalty. It is the recommended setting.\n\n" "Medium:\nExtend it to all sprites. Performance impact remains reasonable in 3D game.\n\n" @@ -103,9 +103,11 @@ const char* dialog_message(int ID, bool* updateText) { "Full:\nExcept few cases, the blending unit will be fully emulated by the shader. It is ultra slow! It is intended for debug.\n\n" "Ultra:\nThe blending unit will be completely emulated by the shader. It is ultra slow! It is intended for debug."; case IDC_SAFE_FBMASK: - return "By default, accurate blending relies on undefined hardware behavior to be fast.\nThis option enables a slower but safer behavior if anyone encounters an issue.\n"; + return "By default, accurate blending relies on undefined hardware behavior to be fast.\n" + "This option enables a slower but safer behavior if anyone encounters an issue.\n"; case IDC_TC_DEPTH: - return "Allows the conversion of Depth buffer from/to Color buffer. It is used for blur & depth of field effects"; + return "Disable the support of Depth buffer in the texture cache.\n" + "It can help to increase speed but it will likely create various glitches."; case IDC_AFCOMBO: return "Reduces texture aliasing at extreme viewing angles. High performance impact."; case IDC_AA1: diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 4fbf330d23..d5918aa786 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -28,17 +28,25 @@ bool GSTextureCache::m_disable_partial_invalidation = false; GSTextureCache::GSTextureCache(GSRenderer* r) : m_renderer(r) { - bool userhacks = !!theApp.GetConfig("UserHacks", 0); s_IS_OPENGL = (static_cast(theApp.GetConfig("Renderer", static_cast(GSRendererType::Default))) == GSRendererType::OGL_HW); - m_spritehack = userhacks ? theApp.GetConfig("UserHacks_SpriteHack", 0) : 0; - UserHacks_HalfPixelOffset = userhacks && theApp.GetConfig("UserHacks_HalfPixelOffset", 0); + if (theApp.GetConfig("UserHacks", 0)) { + m_spritehack = theApp.GetConfig("UserHacks_SpriteHack", 0); + UserHacks_HalfPixelOffset = theApp.GetConfig("UserHacks_HalfPixelOffset", 0); + m_preload_frame = theApp.GetConfig("preload_frame_with_gs_data", 0); + m_disable_partial_invalidation = theApp.GetConfig("UserHacks_DisablePartialInvalidation", 0); + m_can_convert_depth = !theApp.GetConfig("UserHacks_DisableDepthSupport", 0); + } else { + m_spritehack = 0; + UserHacks_HalfPixelOffset = false; + m_preload_frame = false; + m_disable_partial_invalidation = false; + m_can_convert_depth = true; + } m_paltex = !!theApp.GetConfig("paltex", 0); - m_preload_frame = userhacks && theApp.GetConfig("preload_frame_with_gs_data", 0); - m_can_convert_depth = s_IS_OPENGL && theApp.GetConfig("texture_cache_depth", 1); + m_can_convert_depth &= s_IS_OPENGL; // only supported by openGL so far m_crc_hack_level = theApp.GetConfig("crc_hack_level", 3); - m_disable_partial_invalidation = userhacks && theApp.GetConfig("UserHacks_DisablePartialInvalidation", 0); // In theory 4MB is enough but 9MB is safer for overflow (8MB // isn't enough in custom resolution)