VertexShaderGen: Use correct depth output when glClipControl is supported.

This commit is contained in:
Jules Blok
2015-05-19 01:18:04 +02:00
parent 522e721830
commit 88cc91030e
5 changed files with 7 additions and 6 deletions

View File

@ -379,7 +379,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
//write the true depth value, if the game uses depth textures pixel shaders will override with the correct values
//if not early z culling will improve speed
if (api_type == API_D3D)
if (g_ActiveConfig.backend_info.bSupportsClipControl)
{
out.Write("o.pos.z = o.pos.w + o.pos.z;\n");
}

View File

@ -159,6 +159,7 @@ struct VideoConfig final
bool bSupportsGSInstancing; // Needed by GeometryShaderGen, so must stay in VideoCommon
bool bSupportsPostProcessing;
bool bSupportsPaletteConversion;
bool bSupportsClipControl; // Needed by VertexShaderGen, so must stay in VideoCommon
} backend_info;
// Utility