From d37f83ffeba218c6ef94b78532aed50b1ebbc4a4 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 27 Jan 2023 15:07:05 +1300 Subject: Implement AbstractGfx for Software & Null --- Source/Core/VideoBackends/Software/SWmain.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp') 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 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(std::move(window)); + g_gfx = std::make_unique(std::move(window)); + g_bounding_box = std::make_unique(); g_vertex_manager = std::make_unique(); - g_shader_cache = std::make_unique(); - g_framebuffer_manager = std::make_unique(); g_perf_query = std::make_unique(); - g_texture_cache = std::make_unique(); - - 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; } -- cgit v1.2.3