Skip to content
Permalink
Browse files
Merge pull request #11100 from Pokechu22/software-settings-merge
Use the same settings for the software renderer as other backends
  • Loading branch information
lioncash committed Sep 29, 2022
2 parents 3fab5b2 + 3d0cd8b commit 0c19a1d
Show file tree
Hide file tree
Showing 20 changed files with 57 additions and 621 deletions.
@@ -115,8 +115,8 @@ bool SavePNG(const std::string& path, const u8* input, ImageByteFormat format, u

size_t image_len = 0;
spng_decoded_image_size(ctx.get(), SPNG_FMT_PNG, &image_len);
INFO_LOG_FMT(FRAMEDUMP, "{} byte {} by {} image saved to {} at level {} in {}", image_len, width,
height, path, level, timer.ElapsedMs());
INFO_LOG_FMT(FRAMEDUMP, "{} byte {} by {} image saved to {} at level {} in {} ms", image_len,
width, height, path, level, timer.ElapsedMs());
return true;
}

@@ -96,8 +96,6 @@ const Info<bool> GFX_SW_DUMP_OBJECTS{{System::GFX, "Settings", "SWDumpObjects"},
const Info<bool> GFX_SW_DUMP_TEV_STAGES{{System::GFX, "Settings", "SWDumpTevStages"}, false};
const Info<bool> GFX_SW_DUMP_TEV_TEX_FETCHES{{System::GFX, "Settings", "SWDumpTevTexFetches"},
false};
const Info<int> GFX_SW_DRAW_START{{System::GFX, "Settings", "SWDrawStart"}, 0};
const Info<int> GFX_SW_DRAW_END{{System::GFX, "Settings", "SWDrawEnd"}, 100000};

const Info<bool> GFX_PREFER_GLES{{System::GFX, "Settings", "PreferGLES"}, false};

@@ -77,8 +77,6 @@ extern const Info<bool> GFX_SAVE_TEXTURE_CACHE_TO_STATE;
extern const Info<bool> GFX_SW_DUMP_OBJECTS;
extern const Info<bool> GFX_SW_DUMP_TEV_STAGES;
extern const Info<bool> GFX_SW_DUMP_TEV_TEX_FETCHES;
extern const Info<int> GFX_SW_DRAW_START;
extern const Info<int> GFX_SW_DRAW_END;

extern const Info<bool> GFX_PREFER_GLES;

@@ -575,7 +575,6 @@
<ClInclude Include="VideoBackends\OGL\VideoBackend.h" />
<ClInclude Include="VideoBackends\Software\Clipper.h" />
<ClInclude Include="VideoBackends\Software\CopyRegion.h" />
<ClInclude Include="VideoBackends\Software\DebugUtil.h" />
<ClInclude Include="VideoBackends\Software\EfbCopy.h" />
<ClInclude Include="VideoBackends\Software\EfbInterface.h" />
<ClInclude Include="VideoBackends\Software\NativeVertexFormat.h" />
@@ -1183,7 +1182,6 @@
<ClCompile Include="VideoBackends\OGL\ProgramShaderCache.cpp" />
<ClCompile Include="VideoBackends\OGL\SamplerCache.cpp" />
<ClCompile Include="VideoBackends\Software\Clipper.cpp" />
<ClCompile Include="VideoBackends\Software\DebugUtil.cpp" />
<ClCompile Include="VideoBackends\Software\EfbCopy.cpp" />
<ClCompile Include="VideoBackends\Software\EfbInterface.cpp" />
<ClCompile Include="VideoBackends\Software\Rasterizer.cpp" />
@@ -92,8 +92,6 @@ add_executable(dolphin-emu
Config/Graphics/HacksWidget.h
Config/Graphics/PostProcessingConfigWindow.cpp
Config/Graphics/PostProcessingConfigWindow.h
Config/Graphics/SoftwareRendererWidget.cpp
Config/Graphics/SoftwareRendererWidget.h
Config/GraphicsModListWidget.cpp
Config/GraphicsModListWidget.h
Config/GraphicsModWarningWidget.cpp
@@ -18,7 +18,6 @@
#include "DolphinQt/Config/Graphics/EnhancementsWidget.h"
#include "DolphinQt/Config/Graphics/GeneralWidget.h"
#include "DolphinQt/Config/Graphics/HacksWidget.h"
#include "DolphinQt/Config/Graphics/SoftwareRendererWidget.h"
#include "DolphinQt/MainWindow.h"
#include "DolphinQt/QtUtils/WrapInScrollArea.h"

@@ -51,30 +50,19 @@ void GraphicsWindow::CreateMainLayout()
m_enhancements_widget = new EnhancementsWidget(this);
m_hacks_widget = new HacksWidget(this);
m_advanced_widget = new AdvancedWidget(this);
m_software_renderer = new SoftwareRendererWidget(this);

connect(m_general_widget, &GeneralWidget::BackendChanged, this,
&GraphicsWindow::OnBackendChanged);
connect(m_software_renderer, &SoftwareRendererWidget::BackendChanged, this,
&GraphicsWindow::OnBackendChanged);

m_wrapped_general = GetWrappedWidget(m_general_widget, this, 50, 100);
m_wrapped_enhancements = GetWrappedWidget(m_enhancements_widget, this, 50, 100);
m_wrapped_hacks = GetWrappedWidget(m_hacks_widget, this, 50, 100);
m_wrapped_advanced = GetWrappedWidget(m_advanced_widget, this, 50, 100);
m_wrapped_software = GetWrappedWidget(m_software_renderer, this, 50, 100);

if (Config::Get(Config::MAIN_GFX_BACKEND) != "Software Renderer")
{
m_tab_widget->addTab(m_wrapped_general, tr("General"));
m_tab_widget->addTab(m_wrapped_enhancements, tr("Enhancements"));
m_tab_widget->addTab(m_wrapped_hacks, tr("Hacks"));
m_tab_widget->addTab(m_wrapped_advanced, tr("Advanced"));
}
else
{
m_tab_widget->addTab(m_wrapped_software, tr("Software Renderer"));
}

m_tab_widget->addTab(m_wrapped_general, tr("General"));
m_tab_widget->addTab(m_wrapped_enhancements, tr("Enhancements"));
m_tab_widget->addTab(m_wrapped_hacks, tr("Hacks"));
m_tab_widget->addTab(m_wrapped_advanced, tr("Advanced"));

setLayout(main_layout);
}
@@ -86,20 +74,6 @@ void GraphicsWindow::OnBackendChanged(const QString& backend_name)

setWindowTitle(
tr("%1 Graphics Configuration").arg(tr(g_video_backend->GetDisplayName().c_str())));
if (backend_name == QStringLiteral("Software Renderer") && m_tab_widget->count() > 1)
{
m_tab_widget->clear();
m_tab_widget->addTab(m_wrapped_software, tr("Software Renderer"));
}

if (backend_name != QStringLiteral("Software Renderer") && m_tab_widget->count() == 1)
{
m_tab_widget->clear();
m_tab_widget->addTab(m_wrapped_general, tr("General"));
m_tab_widget->addTab(m_wrapped_enhancements, tr("Enhancements"));
m_tab_widget->addTab(m_wrapped_hacks, tr("Hacks"));
m_tab_widget->addTab(m_wrapped_advanced, tr("Advanced"));
}

emit BackendChanged(backend_name);
}

This file was deleted.

This file was deleted.

@@ -79,7 +79,6 @@
<ClCompile Include="Config\Graphics\GraphicsWindow.cpp" />
<ClCompile Include="Config\Graphics\HacksWidget.cpp" />
<ClCompile Include="Config\Graphics\PostProcessingConfigWindow.cpp" />
<ClCompile Include="Config\Graphics\SoftwareRendererWidget.cpp" />
<ClCompile Include="Config\GraphicsModListWidget.cpp" />
<ClCompile Include="Config\GraphicsModWarningWidget.cpp" />
<ClCompile Include="Config\InfoWidget.cpp" />
@@ -276,7 +275,6 @@
<QtMoc Include="Config\Graphics\GraphicsWindow.h" />
<QtMoc Include="Config\Graphics\HacksWidget.h" />
<QtMoc Include="Config\Graphics\PostProcessingConfigWindow.h" />
<QtMoc Include="Config\Graphics\SoftwareRendererWidget.h" />
<QtMoc Include="Config\GraphicsModListWidget.h" />
<QtMoc Include="Config\GraphicsModWarningWidget.h" />
<QtMoc Include="Config\InfoWidget.h" />
@@ -2,8 +2,6 @@ add_library(videosoftware
Clipper.cpp
Clipper.h
CopyRegion.h
DebugUtil.cpp
DebugUtil.h
EfbCopy.cpp
EfbCopy.h
EfbInterface.cpp

0 comments on commit 0c19a1d

Please sign in to comment.