summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Null
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-06-09 13:40:21 +0200
committerGitHub <noreply@github.com>2023-06-09 13:40:21 +0200
commit092773ad0cd31cb0f3d111254e4e0bdb24f2c795 (patch)
tree817b91a21f01b8fdeacfdbc084f5aa6b9bad312b /Source/Core/VideoBackends/Null
parente16791f2ca5b6db29a54bc3b189d168632e4974b (diff)
parent8c3dc5b0d69bbe8a11b9cb0499f25f1164176f7c (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/Null')
-rw-r--r--Source/Core/VideoBackends/Null/NullGfx.cpp8
-rw-r--r--Source/Core/VideoBackends/Null/NullGfx.h3
-rw-r--r--Source/Core/VideoBackends/Null/NullTexture.cpp16
-rw-r--r--Source/Core/VideoBackends/Null/NullTexture.h6
4 files changed, 21 insertions, 12 deletions
diff --git a/Source/Core/VideoBackends/Null/NullGfx.cpp b/Source/Core/VideoBackends/Null/NullGfx.cpp
index 7449aae09c..72aea0ce50 100644
--- a/Source/Core/VideoBackends/Null/NullGfx.cpp
+++ b/Source/Core/VideoBackends/Null/NullGfx.cpp
@@ -77,11 +77,13 @@ std::unique_ptr<AbstractPipeline> NullGfx::CreatePipeline(const AbstractPipeline
return std::make_unique<NullPipeline>();
}
-std::unique_ptr<AbstractFramebuffer> NullGfx::CreateFramebuffer(AbstractTexture* color_attachment,
- AbstractTexture* depth_attachment)
+std::unique_ptr<AbstractFramebuffer>
+NullGfx::CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
+ std::vector<AbstractTexture*> additional_color_attachments)
{
return NullFramebuffer::Create(static_cast<NullTexture*>(color_attachment),
- static_cast<NullTexture*>(depth_attachment));
+ static_cast<NullTexture*>(depth_attachment),
+ std::move(additional_color_attachments));
}
std::unique_ptr<NativeVertexFormat>
diff --git a/Source/Core/VideoBackends/Null/NullGfx.h b/Source/Core/VideoBackends/Null/NullGfx.h
index 63b999b859..534109a09c 100644
--- a/Source/Core/VideoBackends/Null/NullGfx.h
+++ b/Source/Core/VideoBackends/Null/NullGfx.h
@@ -22,7 +22,8 @@ public:
std::unique_ptr<AbstractStagingTexture>
CreateStagingTexture(StagingTextureType type, const TextureConfig& config) override;
std::unique_ptr<AbstractFramebuffer>
- CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment) override;
+ CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
+ std::vector<AbstractTexture*> additional_color_attachments) override;
std::unique_ptr<AbstractShader> CreateShaderFromSource(ShaderStage stage, std::string_view source,
std::string_view name) override;
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);
}
diff --git a/Source/Core/VideoBackends/Null/NullTexture.h b/Source/Core/VideoBackends/Null/NullTexture.h
index 8960114685..505f843cd0 100644
--- a/Source/Core/VideoBackends/Null/NullTexture.h
+++ b/Source/Core/VideoBackends/Null/NullTexture.h
@@ -54,11 +54,13 @@ class NullFramebuffer final : public AbstractFramebuffer
{
public:
explicit 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);
- static std::unique_ptr<NullFramebuffer> Create(NullTexture* color_attachment,
- NullTexture* depth_attachment);
+ static std::unique_ptr<NullFramebuffer>
+ Create(NullTexture* color_attachment, NullTexture* depth_attachment,
+ std::vector<AbstractTexture*> additional_color_attachments);
};
} // namespace Null