From 95b99410443e7ae47df1f3e9436e275c80dd3678 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 15 Oct 2021 11:57:53 -0700 Subject: [PATCH] Use Fast Texture Sampling by default This commit changes the default value of Fast Texture Sampling to true, and also moves the setting that controls it to the experimental section of the advanced tab. This is its own commit so that it can be easily reverted when we want to default to Manual Texture Sampling. Co-authored-by: JosJuice --- .../features/settings/model/BooleanSetting.java | 2 +- .../settings/ui/SettingsFragmentPresenter.java | 4 ++-- .../Android/app/src/main/res/values/strings.xml | 4 ++-- Source/Core/Core/Config/GraphicsSettings.cpp | 2 +- .../DolphinQt/Config/Graphics/AdvancedWidget.cpp | 15 +++++++++++++++ .../DolphinQt/Config/Graphics/AdvancedWidget.h | 1 + .../DolphinQt/Config/Graphics/HacksWidget.cpp | 15 --------------- .../Core/DolphinQt/Config/Graphics/HacksWidget.h | 1 - 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java index 7b488719a6..7423bf3db6 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java @@ -199,7 +199,7 @@ public enum BooleanSetting implements AbstractBooleanSetting "EFBEmulateFormatChanges", false), GFX_HACK_VERTEX_ROUDING(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, "VertexRounding", false), GFX_HACK_FAST_TEXTURE_SAMPLING(Settings.FILE_GFX, Settings.SECTION_GFX_HACKS, - "FastTextureSampling", false), + "FastTextureSampling", true), LOGGER_WRITE_TO_FILE(Settings.FILE_LOGGER, Settings.SECTION_LOGGER_OPTIONS, "WriteToFile", false), diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java index 3eb95efa68..c9f4a31712 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java @@ -719,8 +719,6 @@ public final class SettingsFragmentPresenter R.string.vertex_rounding, R.string.vertex_rounding_description)); sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_SAVE_TEXTURE_CACHE_TO_STATE, R.string.texture_cache_to_state, R.string.texture_cache_to_state_description)); - sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_HACK_FAST_TEXTURE_SAMPLING, - R.string.fast_texture_sampling, R.string.fast_texture_sampling_description)); } private void addAdvancedGraphicsSettings(ArrayList sl) @@ -746,6 +744,8 @@ public final class SettingsFragmentPresenter R.string.backend_multithreading, R.string.backend_multithreading_description)); sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_HACK_EFB_DEFER_INVALIDATION, R.string.defer_efb_invalidation, R.string.defer_efb_invalidation_description)); + sl.add(new InvertedCheckBoxSetting(mContext, BooleanSetting.GFX_HACK_FAST_TEXTURE_SAMPLING, + R.string.manual_texture_sampling, R.string.manual_texture_sampling_description)); sl.add(new CheckBoxSetting(mContext, BooleanSetting.GFX_INTERNAL_RESOLUTION_FRAME_DUMPS, R.string.internal_resolution_dumps, R.string.internal_resolution_dumps_description)); diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index 664e9e8343..c424629dde 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -277,8 +277,6 @@ Rounds 2D vertices to whole pixels. Fixes graphical problems in some games at higher internal resolutions. This setting has no effect when native internal resolution is used. If unsure, leave this unchecked. Save Texture Cache to State Includes the contents of the embedded frame buffer (EFB) and upscaled EFB copies in save states. Fixes missing and/or non-upscaled textures/objects when loading states at the cost of additional save/load time. - Fast Texture Sampling - Use the video backend\'s built-in texture sampling functionality instead of a manual implementation. Aspect Ratio Select what aspect ratio to use when rendering Shader Compilation Mode @@ -305,6 +303,8 @@ Enables graphics backend multithreading (Vulkan only). May affect performance. If unsure, leave this unchecked. Defer EFB Cache Invalidation Defers invalidation of the EFB access cache until a GPU synchronization command is executed. May improve performance in some games at the cost of stability. If unsure, leave this unchecked. + Manual Texture Sampling + Use a manual implementation of texture sampling instead of the graphics backend\'s built-in functionality. Dump Frames at Internal Resolution Creates frame dumps and screenshots at the internal resolution of the renderer, rather than the size of the window it is displayed within. If the aspect ratio is widescreen, the output image will be scaled horizontally to preserve the vertical resolution. Debugging diff --git a/Source/Core/Core/Config/GraphicsSettings.cpp b/Source/Core/Core/Config/GraphicsSettings.cpp index d859cab150..4ce7c1b3a8 100644 --- a/Source/Core/Core/Config/GraphicsSettings.cpp +++ b/Source/Core/Core/Config/GraphicsSettings.cpp @@ -151,7 +151,7 @@ const Info GFX_HACK_VERTEX_ROUDING{{System::GFX, "Hacks", "VertexRounding" const Info GFX_HACK_MISSING_COLOR_VALUE{{System::GFX, "Hacks", "MissingColorValue"}, 0xFFFFFFFF}; const Info GFX_HACK_FAST_TEXTURE_SAMPLING{{System::GFX, "Hacks", "FastTextureSampling"}, - false}; + true}; // Graphics.GameSpecific diff --git a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp index 3a62620f1c..332927ea10 100644 --- a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp @@ -138,8 +138,11 @@ void AdvancedWidget::CreateWidgets() m_defer_efb_access_invalidation = new GraphicsBool(tr("Defer EFB Cache Invalidation"), Config::GFX_HACK_EFB_DEFER_INVALIDATION); + m_manual_texture_sampling = + new GraphicsBool(tr("Manual Texture Sampling"), Config::GFX_HACK_FAST_TEXTURE_SAMPLING, true); experimental_layout->addWidget(m_defer_efb_access_invalidation, 0, 0); + experimental_layout->addWidget(m_manual_texture_sampling, 0, 1); main_layout->addWidget(debugging_box); main_layout->addWidget(utility_box); @@ -266,6 +269,17 @@ void AdvancedWidget::AddDescriptions() "

May improve performance in some games which rely on CPU EFB Access at the cost " "of stability.

If unsure, leave this " "unchecked."); + static const char TR_MANUAL_TEXTURE_SAMPLING_DESCRIPTION[] = QT_TR_NOOP( + "Use a manual implementation of texture sampling instead of the graphics backend's built-in " + "functionality.

" + "This setting can fix graphical issues in some games on certain GPUs, most commonly vertical " + "lines on FMVs. In addition to this, enabling Manual Texture Sampling will allow for correct " + "emulation of texture wrapping special cases (at 1x IR or when scaled EFB is disabled, and " + "with custom textures disabled) and better emulates Level of Detail calculation.

" + "This comes at the cost of potentially worse performance, especially at higher internal " + "resolutions; additionally, Anisotropic Filtering is currently incompatible with Manual " + "Texture Sampling.

" + "If unsure, leave this unchecked."); #ifdef _WIN32 static const char TR_BORDERLESS_FULLSCREEN_DESCRIPTION[] = QT_TR_NOOP( @@ -299,4 +313,5 @@ void AdvancedWidget::AddDescriptions() m_borderless_fullscreen->SetDescription(tr(TR_BORDERLESS_FULLSCREEN_DESCRIPTION)); #endif m_defer_efb_access_invalidation->SetDescription(tr(TR_DEFER_EFB_ACCESS_INVALIDATION_DESCRIPTION)); + m_manual_texture_sampling->SetDescription(tr(TR_MANUAL_TEXTURE_SAMPLING_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h index abda8395f7..805f1e54b3 100644 --- a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h +++ b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h @@ -61,4 +61,5 @@ private: // Experimental GraphicsBool* m_defer_efb_access_invalidation; + GraphicsBool* m_manual_texture_sampling; }; diff --git a/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp index 4dc302ce1e..2765e2e2fd 100644 --- a/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp @@ -106,14 +106,11 @@ void HacksWidget::CreateWidgets() m_vertex_rounding = new GraphicsBool(tr("Vertex Rounding"), Config::GFX_HACK_VERTEX_ROUDING); m_save_texture_cache_state = new GraphicsBool(tr("Save Texture Cache to State"), Config::GFX_SAVE_TEXTURE_CACHE_TO_STATE); - m_fast_texture_sampling = - new GraphicsBool(tr("Fast Texture Sampling"), Config::GFX_HACK_FAST_TEXTURE_SAMPLING); other_layout->addWidget(m_fast_depth_calculation, 0, 0); other_layout->addWidget(m_disable_bounding_box, 0, 1); other_layout->addWidget(m_vertex_rounding, 1, 0); other_layout->addWidget(m_save_texture_cache_state, 1, 1); - other_layout->addWidget(m_fast_texture_sampling, 2, 0); main_layout->addWidget(efb_box); main_layout->addWidget(texture_cache_box); @@ -279,17 +276,6 @@ void HacksWidget::AddDescriptions() "higher internal resolutions. This setting has no effect when native internal " "resolution is used.

If unsure, leave this " "unchecked."); - static const char TR_FAST_TEXTURE_SAMPLING_DESCRIPTION[] = QT_TR_NOOP( - "Use the video backend's built-in texture sampling functionality instead of a manual " - "implementation.

" - "This setting can cause potentially improve performance, especially at higher internal " - "resolutions; additionally, Anisotropic Filtering currently only works with Fast Texture " - "Sampling.

" - "This comes at the cost of graphical issues in some games on certain GPUs, most commonly " - "vertical lines on FMVs, as well as lack of emulation of texture wrapping special cases " - "(though this also only works at 1x IR or when scaled EFB is disabled, and with custom " - "textures disabled) and worse emulation of Level of Detail calculation.

" - "If unsure, leave this unchecked."); m_skip_efb_cpu->SetDescription(tr(TR_SKIP_EFB_CPU_ACCESS_DESCRIPTION)); m_ignore_format_changes->SetDescription(tr(TR_IGNORE_FORMAT_CHANGE_DESCRIPTION)); @@ -305,7 +291,6 @@ void HacksWidget::AddDescriptions() m_disable_bounding_box->SetDescription(tr(TR_DISABLE_BOUNDINGBOX_DESCRIPTION)); m_save_texture_cache_state->SetDescription(tr(TR_SAVE_TEXTURE_CACHE_TO_STATE_DESCRIPTION)); m_vertex_rounding->SetDescription(tr(TR_VERTEX_ROUNDING_DESCRIPTION)); - m_fast_texture_sampling->SetDescription(tr(TR_FAST_TEXTURE_SAMPLING_DESCRIPTION)); } void HacksWidget::UpdateDeferEFBCopiesEnabled() diff --git a/Source/Core/DolphinQt/Config/Graphics/HacksWidget.h b/Source/Core/DolphinQt/Config/Graphics/HacksWidget.h index c34cd27ff8..490a5b4f7e 100644 --- a/Source/Core/DolphinQt/Config/Graphics/HacksWidget.h +++ b/Source/Core/DolphinQt/Config/Graphics/HacksWidget.h @@ -43,7 +43,6 @@ private: GraphicsBool* m_disable_bounding_box; GraphicsBool* m_vertex_rounding; GraphicsBool* m_save_texture_cache_state; - GraphicsBool* m_fast_texture_sampling; void CreateWidgets(); void ConnectWidgets();