diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2018-07-19 23:36:16 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-19 23:36:16 +1000 |
| commit | 67872cd2d1e141ab3f666ceff45c5c27fea0a53d (patch) | |
| tree | ad8ae5708c2d002d870663e5f329d3edf6275b9a /Source/Core/VideoCommon/FramebufferManagerBase.cpp | |
| parent | f5e8af7b6ca24962f1a9fea14b989a0092bae210 (diff) | |
| parent | dae161e1385f6f8904bbcc0803d7ae01fdf4bd8d (diff) | |
Merge pull request #7275 from stenzek/d24s8
FramebufferManager: Use D24S8 on Adreno when using Vulkan
Diffstat (limited to 'Source/Core/VideoCommon/FramebufferManagerBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/FramebufferManagerBase.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManagerBase.cpp b/Source/Core/VideoCommon/FramebufferManagerBase.cpp index af8ad87256..530aac7584 100644 --- a/Source/Core/VideoCommon/FramebufferManagerBase.cpp +++ b/Source/Core/VideoCommon/FramebufferManagerBase.cpp @@ -6,6 +6,8 @@ #include <memory> +#include "VideoCommon/AbstractTexture.h" +#include "VideoCommon/DriverDetails.h" #include "VideoCommon/RenderBase.h" std::unique_ptr<FramebufferManagerBase> g_framebuffer_manager; @@ -13,3 +15,14 @@ std::unique_ptr<FramebufferManagerBase> g_framebuffer_manager; unsigned int FramebufferManagerBase::m_EFBLayers = 1; FramebufferManagerBase::~FramebufferManagerBase() = default; + +AbstractTextureFormat FramebufferManagerBase::GetEFBDepthFormat() +{ + // 32-bit depth clears are broken in the Adreno Vulkan driver, and have no effect. + // To work around this, we use a D24_S8 buffer instead, which results in a loss of accuracy. + // We still resolve this to a R32F texture, as there is no 24-bit format. + if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_D32F_CLEAR)) + return AbstractTextureFormat::D24_S8; + else + return AbstractTextureFormat::D32F; +} |
