diff --git a/src/core/host.cpp b/src/core/host.cpp index f7da14d14..00b01cecc 100644 --- a/src/core/host.cpp +++ b/src/core/host.cpp @@ -253,6 +253,10 @@ bool Host::CreateGPUDevice(RenderAPI api) disabled_features |= GPUDevice::FEATURE_MASK_DUAL_SOURCE_BLEND; if (g_settings.gpu_disable_framebuffer_fetch) disabled_features |= GPUDevice::FEATURE_MASK_FRAMEBUFFER_FETCH; + if (g_settings.gpu_disable_texture_buffers) + disabled_features |= GPUDevice::FEATURE_MASK_TEXTURE_BUFFERS; + if (g_settings.gpu_disable_texture_copy_to_self) + disabled_features |= GPUDevice::FEATURE_MASK_TEXTURE_COPY_TO_SELF; // TODO: FSUI should always use vsync.. const bool vsync = System::IsValid() ? System::ShouldUseVSync() : g_settings.video_sync_enabled; diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 951507a6b..040126ada 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -183,6 +183,8 @@ void Settings::Load(SettingsInterface& si) gpu_disable_shader_cache = si.GetBoolValue("GPU", "DisableShaderCache", false); gpu_disable_dual_source_blend = si.GetBoolValue("GPU", "DisableDualSourceBlend", false); gpu_disable_framebuffer_fetch = si.GetBoolValue("GPU", "DisableFramebufferFetch", false); + gpu_disable_texture_buffers = si.GetBoolValue("GPU", "DisableTextureBuffers", false); + gpu_disable_texture_copy_to_self = si.GetBoolValue("GPU", "DisableTextureCopyToSelf", false); gpu_per_sample_shading = si.GetBoolValue("GPU", "PerSampleShading", false); gpu_use_thread = si.GetBoolValue("GPU", "UseThread", true); gpu_use_software_renderer_for_readbacks = si.GetBoolValue("GPU", "UseSoftwareRendererForReadbacks", false); @@ -447,6 +449,8 @@ void Settings::Save(SettingsInterface& si) const si.SetBoolValue("GPU", "DisableShaderCache", gpu_disable_shader_cache); si.SetBoolValue("GPU", "DisableDualSourceBlend", gpu_disable_dual_source_blend); si.SetBoolValue("GPU", "DisableFramebufferFetch", gpu_disable_framebuffer_fetch); + si.SetBoolValue("GPU", "DisableTextureBuffers", gpu_disable_texture_buffers); + si.SetBoolValue("GPU", "DisableTextureCopyToSelf", gpu_disable_texture_copy_to_self); si.SetBoolValue("GPU", "PerSampleShading", gpu_per_sample_shading); si.SetBoolValue("GPU", "UseThread", gpu_use_thread); si.SetBoolValue("GPU", "ThreadedPresentation", gpu_threaded_presentation); diff --git a/src/core/settings.h b/src/core/settings.h index c8d888c9d..08a6c3128 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -102,6 +102,8 @@ struct Settings bool gpu_disable_shader_cache = false; bool gpu_disable_dual_source_blend = false; bool gpu_disable_framebuffer_fetch = false; + bool gpu_disable_texture_buffers = false; + bool gpu_disable_texture_copy_to_self = false; bool gpu_per_sample_shading = false; bool gpu_true_color = true; bool gpu_scaled_dithering = true; diff --git a/src/core/system.cpp b/src/core/system.cpp index 7445af7a1..65f1c1670 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -3516,6 +3516,8 @@ void System::CheckForSettingsChanges(const Settings& old_settings) g_settings.gpu_disable_shader_cache != old_settings.gpu_disable_shader_cache || g_settings.gpu_disable_dual_source_blend != old_settings.gpu_disable_dual_source_blend || g_settings.gpu_disable_framebuffer_fetch != old_settings.gpu_disable_framebuffer_fetch || + g_settings.gpu_disable_texture_buffers != old_settings.gpu_disable_texture_buffers || + g_settings.gpu_disable_texture_copy_to_self != old_settings.gpu_disable_texture_copy_to_self || g_settings.display_exclusive_fullscreen_control != old_settings.display_exclusive_fullscreen_control)) { // if debug device/threaded presentation change, we need to recreate the whole display @@ -3525,6 +3527,8 @@ void System::CheckForSettingsChanges(const Settings& old_settings) g_settings.gpu_disable_shader_cache != old_settings.gpu_disable_shader_cache || g_settings.gpu_disable_dual_source_blend != old_settings.gpu_disable_dual_source_blend || g_settings.gpu_disable_framebuffer_fetch != old_settings.gpu_disable_framebuffer_fetch || + g_settings.gpu_disable_texture_buffers != old_settings.gpu_disable_texture_buffers || + g_settings.gpu_disable_texture_copy_to_self != old_settings.gpu_disable_texture_copy_to_self || g_settings.display_exclusive_fullscreen_control != old_settings.display_exclusive_fullscreen_control); Host::AddIconOSDMessage("RendererSwitch", ICON_FA_PAINT_ROLLER, diff --git a/src/duckstation-qt/advancedsettingswidget.cpp b/src/duckstation-qt/advancedsettingswidget.cpp index 1ed739231..ec3395361 100644 --- a/src/duckstation-qt/advancedsettingswidget.cpp +++ b/src/duckstation-qt/advancedsettingswidget.cpp @@ -349,6 +349,10 @@ void AdvancedSettingsWidget::addTweakOptions() "DisableDualSourceBlend", false); addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Disable Framebuffer Fetch"), "GPU", "DisableFramebufferFetch", false); + addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Disable Texture Buffers"), "GPU", "DisableTextureBuffers", + false); + addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Disable Texture Copy To Self"), "GPU", + "DisableTextureCopyToSelf", false); addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Stretch Display Vertically"), "Display", "StretchVertically", false); @@ -377,11 +381,11 @@ void AdvancedSettingsWidget::onResetToDefaultClicked() { int i = 0; - setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable all enhancements - setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Show status indicators - setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Show frame times - setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply compatibility settings - setIntRangeTweakOption(m_ui.tweakOptionTable, i++, 0); // Display FPS limit + setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable all enhancements + setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Show status indicators + setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Show frame times + setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply compatibility settings + setIntRangeTweakOption(m_ui.tweakOptionTable, i++, 0); // Display FPS limit setChoiceTweakOption(m_ui.tweakOptionTable, i++, Settings::DEFAULT_DISPLAY_EXCLUSIVE_FULLSCREEN_CONTROL); setChoiceTweakOption(m_ui.tweakOptionTable, i++, 0); // Multisample antialiasing setChoiceTweakOption(m_ui.tweakOptionTable, i++, 0); // Wireframe mode @@ -400,7 +404,7 @@ void AdvancedSettingsWidget::onResetToDefaultClicked() setIntRangeTweakOption(m_ui.tweakOptionTable, i++, Settings::DEFAULT_VRAM_WRITE_DUMP_WIDTH_THRESHOLD); // Minimum dumped VRAM width setIntRangeTweakOption(m_ui.tweakOptionTable, i++, - Settings::DEFAULT_VRAM_WRITE_DUMP_HEIGHT_THRESHOLD); // Minimum dumped VRAm height + Settings::DEFAULT_VRAM_WRITE_DUMP_HEIGHT_THRESHOLD); // Minimum dumped VRAM height setIntRangeTweakOption(m_ui.tweakOptionTable, i++, static_cast(Settings::DEFAULT_DMA_MAX_SLICE_TICKS)); // DMA max slice ticks setIntRangeTweakOption(m_ui.tweakOptionTable, i++, @@ -413,6 +417,8 @@ void AdvancedSettingsWidget::onResetToDefaultClicked() setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable Shader Cache setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable Dual-Source Blend setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable Framebuffer Fetch + setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable Texture Buffers + setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable Texture Copy To Self setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Stretch Display Vertically setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Increase Timer Resolution setChoiceTweakOption(m_ui.tweakOptionTable, i++, @@ -463,6 +469,8 @@ void AdvancedSettingsWidget::onResetToDefaultClicked() sif->DeleteValue("GPU", "DisableShaderCache"); sif->DeleteValue("GPU", "DisableDualSourceBlend"); sif->DeleteValue("GPU", "DisableFramebufferFetch"); + sif->DeleteValue("GPU", "DisableTextureBuffers"); + sif->DeleteValue("GPU", "DisableTextureCopyToSelf"); sif->DeleteValue("Display", "StretchVertically"); sif->DeleteValue("Main", "IncreaseTimerResolution"); sif->DeleteValue("CDROM", "MechaconVersion");