diff options
| author | Tilka <tilkax@gmail.com> | 2019-02-26 04:21:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-26 04:21:05 +0000 |
| commit | 6ce7f44b8a0bb3b95d3f12ebffbef7a71a443fdd (patch) | |
| tree | 98380ce3a3284c52597a6fba86589c847219ecd5 /Source/Core/VideoCommon/AbstractFramebuffer.cpp | |
| parent | 19673ce79af814ca3b77d7f8ea60458e564bfa51 (diff) | |
| parent | f039149198657c1891e1c6462ed30c31ed4b8486 (diff) | |
Merge pull request #7753 from stenzek/videocommon-all-the-things
Move a significant amount of video backend logic to VideoCommon
Diffstat (limited to 'Source/Core/VideoCommon/AbstractFramebuffer.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AbstractFramebuffer.cpp | 9 |
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))) |
