summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/AbstractFramebuffer.cpp
diff options
context:
space:
mode:
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)))