summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Null/NullTexture.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-05-28 20:59:02 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2023-06-03 14:52:31 -0500
commit834f8f7b5cb9b5d9e437c7a3935bfdcc236c422a (patch)
tree429b751c40a96b44a920cc9f59afb3813320a1e0 /Source/Core/VideoBackends/Null/NullTexture.cpp
parent252d3f353aa74b06a1c67daa65eb60f786608a6a (diff)
VideoBackends: add support to allow rendering to multiple output textures
Diffstat (limited to 'Source/Core/VideoBackends/Null/NullTexture.cpp')
-rw-r--r--Source/Core/VideoBackends/Null/NullTexture.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/Null/NullTexture.cpp b/Source/Core/VideoBackends/Null/NullTexture.cpp
index 1b238ef674..89da5ae735 100644
--- a/Source/Core/VideoBackends/Null/NullTexture.cpp
+++ b/Source/Core/VideoBackends/Null/NullTexture.cpp
@@ -66,18 +66,21 @@ void NullStagingTexture::Flush()
NullFramebuffer::NullFramebuffer(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<NullFramebuffer> NullFramebuffer::Create(NullTexture* color_attachment,
- NullTexture* depth_attachment)
+std::unique_ptr<NullFramebuffer>
+NullFramebuffer::Create(NullTexture* color_attachment, NullTexture* 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 =
@@ -90,7 +93,8 @@ std::unique_ptr<NullFramebuffer> NullFramebuffer::Create(NullTexture* color_atta
const u32 layers = either_attachment->GetLayers();
const u32 samples = either_attachment->GetSamples();
- return std::make_unique<NullFramebuffer>(color_attachment, depth_attachment, color_format,
+ return std::make_unique<NullFramebuffer>(color_attachment, depth_attachment,
+ std::move(additional_color_attachments), color_format,
depth_format, width, height, layers, samples);
}