summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/AbstractFramebuffer.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-02-15 11:59:50 +1000
committerStenzek <stenzek@gmail.com>2019-02-19 16:57:54 +1000
commitf039149198657c1891e1c6462ed30c31ed4b8486 (patch)
treeb914fd7b0ef9c937e9334a880a49a26a26f17c8f /Source/Core/VideoCommon/AbstractFramebuffer.cpp
parent933f3ba008942cba96ed623c25e61d6ea86582fe (diff)
Move most backend functionality to VideoCommon
Diffstat (limited to 'Source/Core/VideoCommon/AbstractFramebuffer.cpp')
-rw-r--r--Source/Core/VideoCommon/AbstractFramebuffer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/AbstractFramebuffer.cpp b/Source/Core/VideoCommon/AbstractFramebuffer.cpp
index f8a9b07ba8..c6a1693788 100644
--- a/Source/Core/VideoCommon/AbstractFramebuffer.cpp
+++ b/Source/Core/VideoCommon/AbstractFramebuffer.cpp
@@ -5,10 +5,13 @@
#include "VideoCommon/AbstractFramebuffer.h"
#include "VideoCommon/AbstractTexture.h"
-AbstractFramebuffer::AbstractFramebuffer(AbstractTextureFormat color_format,
+AbstractFramebuffer::AbstractFramebuffer(AbstractTexture* color_attachment,
+ AbstractTexture* depth_attachment,
+ AbstractTextureFormat color_format,
AbstractTextureFormat depth_format, u32 width, u32 height,
u32 layers, u32 samples)
- : m_color_format(color_format), m_depth_format(depth_format), m_width(width), m_height(height),
+ : m_color_attachment(color_attachment), m_depth_attachment(depth_attachment),
+ m_color_format(color_format), m_depth_format(depth_format), m_width(width), m_height(height),
m_layers(layers), m_samples(samples)
{
}
@@ -26,7 +29,7 @@ bool AbstractFramebuffer::ValidateConfig(const AbstractTexture* color_attachment
// MSAA textures are not supported with mip levels on most backends, and it simplifies our
// handling of framebuffers.
auto CheckAttachment = [](const AbstractTexture* tex) {
- return tex->GetConfig().rendertarget && tex->GetConfig().levels == 1;
+ return tex->GetConfig().IsRenderTarget() && tex->GetConfig().levels == 1;
};
if ((color_attachment && !CheckAttachment(color_attachment)) ||
(depth_attachment && !CheckAttachment(depth_attachment)))