OGL: Add support for glDepthRangedNV to handle oversized depth ranges.

This commit is contained in:
Jules Blok
2016-08-06 13:30:32 +02:00
parent 28e6e259ed
commit 94522d4cf3
15 changed files with 119 additions and 44 deletions

View File

@ -391,7 +391,8 @@ void VertexShaderManager::SetConstants()
constants.pixelcentercorrection[2] = 1.0f;
constants.pixelcentercorrection[3] = 0.0f;
if (g_ActiveConfig.backend_info.bSupportsDepthClamp)
if (g_ActiveConfig.backend_info.bSupportsDepthClamp &&
!g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges)
{
// Oversized depth ranges are handled in the vertex shader. We need to reverse
// the far value to get a reversed depth range mapping. This is necessary

View File

@ -172,6 +172,7 @@ struct VideoConfig final
bool bSupportsDualSourceBlend;
bool bSupportsPrimitiveRestart;
bool bSupportsOversizedViewports;
bool bSupportsOversizedDepthRanges;
bool bSupportsGeometryShaders;
bool bSupports3DVision;
bool bSupportsEarlyZ; // needed by PixelShaderGen, so must stay in VideoCommon