From 227926c1faf1a8e982c8ed8088da1b978a3f2b24 Mon Sep 17 00:00:00 2001 From: GPUCode <47210458+GPUCode@users.noreply.github.com> Date: Wed, 26 Apr 2023 01:19:02 +0300 Subject: [PATCH] Remove remnants of separable shader setting (#6403) --- src/android/app/src/main/jni/default_ini.h | 4 --- src/citra/config.cpp | 6 ---- src/citra/default_ini.h | 4 --- src/citra_qt/configuration/config.cpp | 11 ------- .../configuration/configure_graphics.cpp | 31 ------------------- .../configuration/configure_graphics.h | 1 - .../configuration/configure_graphics.ui | 8 ----- src/common/settings.cpp | 3 -- src/common/settings.h | 1 - .../renderer_opengl/gl_rasterizer.cpp | 10 ------ src/video_core/video_core.cpp | 1 - src/video_core/video_core.h | 1 - 12 files changed, 81 deletions(-) diff --git a/src/android/app/src/main/jni/default_ini.h b/src/android/app/src/main/jni/default_ini.h index 8ea457703..04c205c85 100644 --- a/src/android/app/src/main/jni/default_ini.h +++ b/src/android/app/src/main/jni/default_ini.h @@ -106,10 +106,6 @@ graphics_api = # 0: Software, 1 (default): Hardware use_hw_shader = -# Whether to use separable shaders to emulate 3DS shaders (macOS only) -# 0: Off (Default), 1 : On -separable_shader = - # Whether to use accurate multiplication in hardware shaders # 0: Off (Default. Faster, but causes issues in some games) 1: On (Slower, but correct) shaders_accurate_mul = diff --git a/src/citra/config.cpp b/src/citra/config.cpp index 53cbb107d..0e2addff9 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp @@ -136,12 +136,6 @@ void Config::ReadValues() { ReadSetting("Renderer", Settings::values.graphics_api); ReadSetting("Renderer", Settings::values.use_gles); ReadSetting("Renderer", Settings::values.use_hw_shader); -#ifdef __APPLE__ - // Separable shader is broken on macos with Intel GPU thanks to poor drivers. - // We still want to provide this option for test/development purposes, but disable it by - // default. - ReadSetting("Renderer", Settings::values.separable_shader); -#endif ReadSetting("Renderer", Settings::values.shaders_accurate_mul); ReadSetting("Renderer", Settings::values.use_shader_jit); ReadSetting("Renderer", Settings::values.resolution_factor); diff --git a/src/citra/default_ini.h b/src/citra/default_ini.h index b34b64d97..d5636bcd5 100644 --- a/src/citra/default_ini.h +++ b/src/citra/default_ini.h @@ -110,10 +110,6 @@ use_gles = # 0: Software, 1 (default): Hardware use_hw_shader = -# Whether to use separable shaders to emulate 3DS shaders (macOS only) -# 0: Off (Default), 1 : On -separable_shader = - # Whether to use accurate multiplication in hardware shaders # 0: Off (Faster, but causes issues in some games) 1: On (Default. Slower, but correct) shaders_accurate_mul = diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index ab5943536..ac17f8b77 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp @@ -628,12 +628,6 @@ void Config::ReadRendererValues() { ReadGlobalSetting(Settings::values.graphics_api); ReadGlobalSetting(Settings::values.use_hw_shader); -#ifdef __APPLE__ - // Hardware shader is broken on macos with Intel GPUs thanks to poor drivers. - // We still want to provide this option for test/development purposes, but disable it by - // default. - ReadGlobalSetting(Settings::values.separable_shader); -#endif ReadGlobalSetting(Settings::values.shaders_accurate_mul); ReadGlobalSetting(Settings::values.use_disk_shader_cache); ReadGlobalSetting(Settings::values.use_vsync_new); @@ -1107,11 +1101,6 @@ void Config::SaveRendererValues() { WriteGlobalSetting(Settings::values.graphics_api); WriteGlobalSetting(Settings::values.use_hw_shader); -#ifdef __APPLE__ - // Hardware shader is broken on macos thanks to poor drivers. - // TODO: enable this for none Intel GPUs - WriteGlobalSetting(Settings::values.separable_shader); -#endif WriteGlobalSetting(Settings::values.shaders_accurate_mul); WriteGlobalSetting(Settings::values.use_disk_shader_cache); WriteGlobalSetting(Settings::values.use_vsync_new); diff --git a/src/citra_qt/configuration/configure_graphics.cpp b/src/citra_qt/configuration/configure_graphics.cpp index 4f3dbaac5..c4fcd81c2 100644 --- a/src/citra_qt/configuration/configure_graphics.cpp +++ b/src/citra_qt/configuration/configure_graphics.cpp @@ -3,9 +3,6 @@ // Refer to the license.txt file included. #include -#ifdef __APPLE__ -#include -#endif #include "citra_qt/configuration/configuration_shared.h" #include "citra_qt/configuration/configure_graphics.h" #include "common/settings.h" @@ -37,28 +34,6 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent) ui->toggle_disk_shader_cache->setEnabled(checked); }); -#ifdef __APPLE__ - connect(ui->toggle_hw_shader, &QCheckBox::stateChanged, this, [this](int state) { - if (state == Qt::Checked) { - ui->toggle_separable_shader->setEnabled(true); - } - }); - connect(ui->toggle_separable_shader, &QCheckBox::stateChanged, this, [this](int state) { - if (state == Qt::Checked) { - QMessageBox::warning( - this, tr("Hardware Shader Warning"), - tr("Separable Shader support is broken on macOS with Intel GPUs, and will cause " - "graphical issues " - "like showing a black screen.

The option is only there for " - "test/development purposes. If you experience graphical issues with Hardware " - "Shader, please turn it off.")); - } - }); -#else - // TODO(B3N30): Hide this for macs with none Intel GPUs, too. - ui->toggle_separable_shader->setVisible(false); -#endif - SetupPerGameUI(); SetConfiguration(); } @@ -77,7 +52,6 @@ void ConfigureGraphics::SetConfiguration() { } ui->toggle_hw_shader->setChecked(Settings::values.use_hw_shader.GetValue()); - ui->toggle_separable_shader->setChecked(Settings::values.separable_shader.GetValue()); ui->toggle_accurate_mul->setChecked(Settings::values.shaders_accurate_mul.GetValue()); ui->toggle_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache.GetValue()); ui->toggle_vsync_new->setChecked(Settings::values.use_vsync_new.GetValue()); @@ -92,8 +66,6 @@ void ConfigureGraphics::ApplyConfiguration() { ui->graphics_api_combo); ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_hw_shader, ui->toggle_hw_shader, use_hw_shader); - ConfigurationShared::ApplyPerGameSetting(&Settings::values.separable_shader, - ui->toggle_separable_shader, separable_shader); ConfigurationShared::ApplyPerGameSetting(&Settings::values.shaders_accurate_mul, ui->toggle_accurate_mul, shaders_accurate_mul); ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_disk_shader_cache, @@ -115,7 +87,6 @@ void ConfigureGraphics::SetupPerGameUI() { if (Settings::IsConfiguringGlobal()) { ui->graphics_api_group->setEnabled(Settings::values.graphics_api.UsingGlobal()); ui->toggle_hw_shader->setEnabled(Settings::values.use_hw_shader.UsingGlobal()); - ui->toggle_separable_shader->setEnabled(Settings::values.separable_shader.UsingGlobal()); ui->toggle_accurate_mul->setEnabled(Settings::values.shaders_accurate_mul.UsingGlobal()); ui->toggle_disk_shader_cache->setEnabled( Settings::values.use_disk_shader_cache.UsingGlobal()); @@ -132,8 +103,6 @@ void ConfigureGraphics::SetupPerGameUI() { ConfigurationShared::SetColoredTristate(ui->toggle_hw_shader, Settings::values.use_hw_shader, use_hw_shader); - ConfigurationShared::SetColoredTristate(ui->toggle_separable_shader, - Settings::values.separable_shader, separable_shader); ConfigurationShared::SetColoredTristate( ui->toggle_accurate_mul, Settings::values.shaders_accurate_mul, shaders_accurate_mul); ConfigurationShared::SetColoredTristate(ui->toggle_disk_shader_cache, diff --git a/src/citra_qt/configuration/configure_graphics.h b/src/citra_qt/configuration/configure_graphics.h index 89d9fa543..389bfba85 100644 --- a/src/citra_qt/configuration/configure_graphics.h +++ b/src/citra_qt/configuration/configure_graphics.h @@ -32,7 +32,6 @@ private: void SetupPerGameUI(); ConfigurationShared::CheckState use_hw_shader; - ConfigurationShared::CheckState separable_shader; ConfigurationShared::CheckState shaders_accurate_mul; ConfigurationShared::CheckState use_disk_shader_cache; ConfigurationShared::CheckState use_vsync_new; diff --git a/src/citra_qt/configuration/configure_graphics.ui b/src/citra_qt/configuration/configure_graphics.ui index f0f2b5c58..74fe21786 100644 --- a/src/citra_qt/configuration/configure_graphics.ui +++ b/src/citra_qt/configuration/configure_graphics.ui @@ -114,13 +114,6 @@ 0 - - - - Separable Shader (Intel GPUs only) - - - @@ -195,7 +188,6 @@ - toggle_separable_shader toggle_accurate_mul toggle_shader_jit toggle_disk_shader_cache diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 123c40b54..616765edb 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -70,7 +70,6 @@ void Apply() { VideoCore::g_shader_jit_enabled = values.use_shader_jit.GetValue(); VideoCore::g_hw_shader_enabled = values.use_hw_shader.GetValue(); - VideoCore::g_separable_shader_enabled = values.separable_shader.GetValue(); VideoCore::g_hw_shader_accurate_mul = values.shaders_accurate_mul.GetValue(); #ifndef ANDROID @@ -135,7 +134,6 @@ void LogSettings() { log_setting("Renderer_GraphicsAPI", GetGraphicsAPIName(values.graphics_api.GetValue())); log_setting("Renderer_Debug", values.renderer_debug.GetValue()); log_setting("Renderer_UseHwShader", values.use_hw_shader.GetValue()); - log_setting("Renderer_SeparableShader", values.separable_shader.GetValue()); log_setting("Renderer_ShadersAccurateMul", values.shaders_accurate_mul.GetValue()); log_setting("Renderer_UseShaderJit", values.use_shader_jit.GetValue()); log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue()); @@ -220,7 +218,6 @@ void RestoreGlobalState(bool is_powered_on) { // Renderer values.graphics_api.SetGlobal(true); values.use_hw_shader.SetGlobal(true); - values.separable_shader.SetGlobal(true); values.use_disk_shader_cache.SetGlobal(true); values.shaders_accurate_mul.SetGlobal(true); values.use_vsync_new.SetGlobal(true); diff --git a/src/common/settings.h b/src/common/settings.h index b48264328..31f15ee2d 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -433,7 +433,6 @@ struct Values { Setting use_gles{false, "use_gles"}; Setting renderer_debug{false, "renderer_debug"}; SwitchableSetting use_hw_shader{true, "use_hw_shader"}; - SwitchableSetting separable_shader{false, "use_separable_shader"}; SwitchableSetting use_disk_shader_cache{true, "use_disk_shader_cache"}; SwitchableSetting shaders_accurate_mul{true, "shaders_accurate_mul"}; SwitchableSetting use_vsync_new{true, "use_vsync_new"}; diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 62fa0ff14..e20b9b8c1 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -173,18 +173,8 @@ RasterizerOpenGL::RasterizerOpenGL(Memory::MemorySystem& memory, VideoCore::Rend state.Apply(); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer.GetHandle()); -#ifdef __APPLE__ - if (driver.GetVendor() == Vendor::Intel) { - shader_program_manager = std::make_unique( - renderer.GetRenderWindow(), driver, VideoCore::g_separable_shader_enabled); - } else { - shader_program_manager = - std::make_unique(renderer.GetRenderWindow(), driver, true); - } -#else shader_program_manager = std::make_unique(renderer.GetRenderWindow(), driver, !GLES); -#endif glEnable(GL_BLEND); diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index 32ae4e8af..fb2239df7 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp @@ -24,7 +24,6 @@ std::unique_ptr g_renderer{}; ///< Renderer plugin std::atomic g_shader_jit_enabled; std::atomic g_hw_shader_enabled; -std::atomic g_separable_shader_enabled; std::atomic g_hw_shader_accurate_mul; Memory::MemorySystem* g_memory; diff --git a/src/video_core/video_core.h b/src/video_core/video_core.h index 47de337af..ff29c307d 100644 --- a/src/video_core/video_core.h +++ b/src/video_core/video_core.h @@ -35,7 +35,6 @@ extern std::unique_ptr g_renderer; ///< Renderer plugin // qt ui) extern std::atomic g_shader_jit_enabled; extern std::atomic g_hw_shader_enabled; -extern std::atomic g_separable_shader_enabled; extern std::atomic g_hw_shader_accurate_mul; extern Memory::MemorySystem* g_memory;