From 99301bd158a90d93dc7fb74e50118b1517a40ed3 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 29 Jun 2013 23:00:57 +0200 Subject: [PATCH] PixelShaderGen: Store early_ztest as part of shader uid. --- Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 1 + Source/Core/VideoCommon/Src/PixelShaderGen.h | 1 + 2 files changed, 2 insertions(+) diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index dd284ced7d..ad8cc4d7c5 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -585,6 +585,7 @@ static void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_TYPE Api uid_data.ztex_op = bpmem.ztex2.op; uid_data.per_pixel_depth = per_pixel_depth; uid_data.fast_depth_calc = g_ActiveConfig.bFastDepthCalc; + uid_data.early_ztest = bpmem.zcontrol.early_ztest; uid_data.fog_fsel = bpmem.fog.c_proj_fsel.fsel; // Note: z-textures are not written to depth buffer if early depth test is used diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.h b/Source/Core/VideoCommon/Src/PixelShaderGen.h index 150a69902e..21004323f9 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.h +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.h @@ -112,6 +112,7 @@ struct pixel_shader_uid_data u32 fast_depth_calc : 1; u32 per_pixel_depth : 1; + u32 early_ztest : 1; u32 xfregs_numTexGen_numTexGens : 4;