mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 22:56:52 +01:00
RenderBase: Check if early ztest is enabled before falling back to vertex depth range.
This commit is contained in:
parent
a15555fe03
commit
3f41e6d4cf
@ -947,15 +947,17 @@ bool Renderer::UseVertexDepthRange() const
|
|||||||
if (!g_ActiveConfig.backend_info.bSupportsDepthClamp)
|
if (!g_ActiveConfig.backend_info.bSupportsDepthClamp)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
const bool ztexture_enabled = bpmem.ztex2.type != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest;
|
||||||
|
|
||||||
if (g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges)
|
if (g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges)
|
||||||
{
|
{
|
||||||
// We support oversized depth ranges, but we need a full depth range if a ztexture is used.
|
// 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
|
else
|
||||||
{
|
{
|
||||||
// We need a full depth range if a ztexture is used.
|
// We need a full depth range if a ztexture is used.
|
||||||
if (bpmem.ztex2.type != ZTEXTURE_DISABLE)
|
if (ztexture_enabled)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// If an inverted depth range is unsupported, we also need to check if the range is inverted.
|
// If an inverted depth range is unsupported, we also need to check if the range is inverted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user