From f039149198657c1891e1c6462ed30c31ed4b8486 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 15 Feb 2019 11:59:50 +1000 Subject: Move most backend functionality to VideoCommon --- Source/Core/VideoBackends/Software/SWRenderer.cpp | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp') diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp index 6369b35b20..4b57b9b551 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp @@ -19,11 +19,15 @@ #include "VideoCommon/AbstractPipeline.h" #include "VideoCommon/AbstractShader.h" +#include "VideoCommon/AbstractTexture.h" #include "VideoCommon/BoundingBox.h" +#include "VideoCommon/NativeVertexFormat.h" #include "VideoCommon/OnScreenDisplay.h" #include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoConfig.h" +namespace SW +{ SWRenderer::SWRenderer(std::unique_ptr window) : ::Renderer(static_cast(MAX_XFB_WIDTH), static_cast(MAX_XFB_HEIGHT), 1.0f, AbstractTextureFormat::RGBA8), @@ -38,21 +42,20 @@ bool SWRenderer::IsHeadless() const std::unique_ptr SWRenderer::CreateTexture(const TextureConfig& config) { - return std::make_unique(config); + return std::make_unique(config); } std::unique_ptr SWRenderer::CreateStagingTexture(StagingTextureType type, const TextureConfig& config) { - return std::make_unique(type, config); + return std::make_unique(type, config); } std::unique_ptr -SWRenderer::CreateFramebuffer(const AbstractTexture* color_attachment, - const AbstractTexture* depth_attachment) +SWRenderer::CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment) { - return SW::SWFramebuffer::Create(static_cast(color_attachment), - static_cast(depth_attachment)); + return SWFramebuffer::Create(static_cast(color_attachment), + static_cast(depth_attachment)); } class SWShader final : public AbstractShader @@ -132,18 +135,15 @@ void SWRenderer::BBoxWrite(int index, u16 value) BoundingBox::coords[index] = value; } -TargetRectangle SWRenderer::ConvertEFBRectangle(const EFBRectangle& rc) -{ - TargetRectangle result; - result.left = rc.left; - result.top = rc.top; - result.right = rc.right; - result.bottom = rc.bottom; - return result; -} - void SWRenderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable, u32 color, u32 z) { EfbCopy::ClearEfb(); } + +std::unique_ptr +SWRenderer::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) +{ + return std::make_unique(vtx_decl); +} +} // namespace SW -- cgit v1.2.3