summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index b749f447bb..46101afe77 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -16,6 +16,8 @@
#include "VideoBackends/Software/Clipper.h"
#include "VideoBackends/Software/EfbInterface.h"
#include "VideoBackends/Software/Rasterizer.h"
+#include "VideoBackends/Software/SWBoundingBox.h"
+#include "VideoBackends/Software/SWGfx.h"
#include "VideoBackends/Software/SWOGLWindow.h"
#include "VideoBackends/Software/SWRenderer.h"
#include "VideoBackends/Software/SWTexture.h"
@@ -23,6 +25,7 @@
#include "VideoBackends/Software/TextureCache.h"
#include "VideoCommon/FramebufferManager.h"
+#include "VideoCommon/Present.h"
#include "VideoCommon/TextureCacheBase.h"
#include "VideoCommon/VideoCommon.h"
#include "VideoCommon/VideoConfig.h"
@@ -96,8 +99,6 @@ void VideoSoftware::InitBackendInfo()
bool VideoSoftware::Initialize(const WindowSystemInfo& wsi)
{
- InitializeShared();
-
std::unique_ptr<SWOGLWindow> window = SWOGLWindow::Create(wsi);
if (!window)
return false;
@@ -105,23 +106,13 @@ bool VideoSoftware::Initialize(const WindowSystemInfo& wsi)
Clipper::Init();
Rasterizer::Init();
- g_renderer = std::make_unique<SWRenderer>(std::move(window));
+ g_gfx = std::make_unique<SWGfx>(std::move(window));
+ g_bounding_box = std::make_unique<SWBoundingBox>();
g_vertex_manager = std::make_unique<SWVertexLoader>();
- g_shader_cache = std::make_unique<VideoCommon::ShaderCache>();
- g_framebuffer_manager = std::make_unique<FramebufferManager>();
g_perf_query = std::make_unique<PerfQuery>();
- g_texture_cache = std::make_unique<TextureCache>();
-
- if (!g_vertex_manager->Initialize() || !g_shader_cache->Initialize() ||
- !g_renderer->Initialize() || !g_framebuffer_manager->Initialize() ||
- !g_texture_cache->Initialize())
- {
- PanicAlertFmt("Failed to initialize renderer classes");
- Shutdown();
- return false;
- }
- g_shader_cache->InitializeShaderCache();
+ InitializeShared();
+
return true;
}