diff options
Diffstat (limited to 'Source/Core/VideoBackends/Null/NullTexture.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Null/NullTexture.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Null/NullTexture.cpp b/Source/Core/VideoBackends/Null/NullTexture.cpp index 1bf3ae1470..2a21afb4b7 100644 --- a/Source/Core/VideoBackends/Null/NullTexture.cpp +++ b/Source/Core/VideoBackends/Null/NullTexture.cpp @@ -21,6 +21,10 @@ void NullTexture::ScaleRectangleFromTexture(const AbstractTexture* source, const MathUtil::Rectangle<int>& dstrect) { } +void NullTexture::ResolveFromTexture(const AbstractTexture* src, + const MathUtil::Rectangle<int>& rect, u32 layer, u32 level) +{ +} void NullTexture::Load(u32 level, u32 width, u32 height, u32 row_length, const u8* buffer, size_t buffer_size) @@ -66,4 +70,31 @@ void NullStagingTexture::Flush() m_needs_flush = false; } +NullFramebuffer::NullFramebuffer(AbstractTextureFormat color_format, + AbstractTextureFormat depth_format, u32 width, u32 height, + u32 layers, u32 samples) + : AbstractFramebuffer(color_format, depth_format, width, height, layers, samples) +{ +} + +std::unique_ptr<NullFramebuffer> NullFramebuffer::Create(const NullTexture* color_attachment, + const NullTexture* depth_attachment) +{ + if (!ValidateConfig(color_attachment, depth_attachment)) + return nullptr; + + const AbstractTextureFormat color_format = + color_attachment ? color_attachment->GetFormat() : AbstractTextureFormat::Undefined; + const AbstractTextureFormat depth_format = + depth_attachment ? depth_attachment->GetFormat() : AbstractTextureFormat::Undefined; + const NullTexture* either_attachment = color_attachment ? color_attachment : depth_attachment; + const u32 width = either_attachment->GetWidth(); + const u32 height = either_attachment->GetHeight(); + const u32 layers = either_attachment->GetLayers(); + const u32 samples = either_attachment->GetSamples(); + + return std::make_unique<NullFramebuffer>(color_format, depth_format, width, height, layers, + samples); +} + } // namespace Null |
