diff options
| author | Jules Blok <jules.blok@gmail.com> | 2017-03-10 15:43:32 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2017-03-10 15:43:32 +0100 |
| commit | 3f41e6d4cf9f1a318c6d32fea4d2b422684961a3 (patch) | |
| tree | 0c557ab23c9b58db097b7b2f115d403d69f50b71 /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | a15555fe0304e1ba560f91f8bacc8b121d226d1c (diff) | |
RenderBase: Check if early ztest is enabled before falling back to vertex depth range.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 19ec2abed2..8ee4de1546 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -947,15 +947,17 @@ bool Renderer::UseVertexDepthRange() const if (!g_ActiveConfig.backend_info.bSupportsDepthClamp) return false; + const bool ztexture_enabled = bpmem.ztex2.type != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest; + if (g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges) { // We support oversized depth ranges, but we need a full depth range if a ztexture is used. - return bpmem.ztex2.type != ZTEXTURE_DISABLE; + return ztexture_enabled; } else { // We need a full depth range if a ztexture is used. - if (bpmem.ztex2.type != ZTEXTURE_DISABLE) + if (ztexture_enabled) return true; // If an inverted depth range is unsupported, we also need to check if the range is inverted. |
