diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-06-09 13:40:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-09 13:40:21 +0200 |
| commit | 092773ad0cd31cb0f3d111254e4e0bdb24f2c795 (patch) | |
| tree | 817b91a21f01b8fdeacfdbc084f5aa6b9bad312b /Source/Core/VideoBackends/Software/SWTexture.cpp | |
| parent | e16791f2ca5b6db29a54bc3b189d168632e4974b (diff) | |
| parent | 8c3dc5b0d69bbe8a11b9cb0499f25f1164176f7c (diff) | |
Merge pull request #11859 from iwubcode/backend-multi-output
VideoBackends: add support to allow rendering to multiple output targets
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWTexture.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWTexture.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/Software/SWTexture.cpp b/Source/Core/VideoBackends/Software/SWTexture.cpp index 0e3ebbde55..0ada0502f0 100644 --- a/Source/Core/VideoBackends/Software/SWTexture.cpp +++ b/Source/Core/VideoBackends/Software/SWTexture.cpp @@ -159,17 +159,20 @@ void SWStagingTexture::Flush() } SWFramebuffer::SWFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment, + std::vector<AbstractTexture*> additional_color_attachments, AbstractTextureFormat color_format, AbstractTextureFormat depth_format, u32 width, u32 height, u32 layers, u32 samples) - : AbstractFramebuffer(color_attachment, depth_attachment, color_format, depth_format, width, - height, layers, samples) + : AbstractFramebuffer(color_attachment, depth_attachment, + std::move(additional_color_attachments), color_format, depth_format, + width, height, layers, samples) { } -std::unique_ptr<SWFramebuffer> SWFramebuffer::Create(SWTexture* color_attachment, - SWTexture* depth_attachment) +std::unique_ptr<SWFramebuffer> +SWFramebuffer::Create(SWTexture* color_attachment, SWTexture* depth_attachment, + std::vector<AbstractTexture*> additional_color_attachments) { - if (!ValidateConfig(color_attachment, depth_attachment)) + if (!ValidateConfig(color_attachment, depth_attachment, additional_color_attachments)) return nullptr; const AbstractTextureFormat color_format = @@ -182,7 +185,8 @@ std::unique_ptr<SWFramebuffer> SWFramebuffer::Create(SWTexture* color_attachment const u32 layers = either_attachment->GetLayers(); const u32 samples = either_attachment->GetSamples(); - return std::make_unique<SWFramebuffer>(color_attachment, depth_attachment, color_format, + return std::make_unique<SWFramebuffer>(color_attachment, depth_attachment, + std::move(additional_color_attachments), color_format, depth_format, width, height, layers, samples); } |
