summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-10-13 15:41:11 +0200
committerdegasus <wickmarkus@web.de>2013-10-13 15:41:11 +0200
commit6798a4763e9c879a3e2ace6da26527e533c66aa4 (patch)
treef1e8024ab7f58bb81d875e3bda2a3865f1d3d397 /Source/Core/VideoCommon
parent4dc1881f58f0b3c1276c5fde26fcabcdf114903f (diff)
VideoCommon: revert the ViewPort changes
xfregs isn't written when calling this function, so we have to use such an invalid flag :-(
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderManager.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
index c773e734d6..5f793b5a44 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
@@ -12,6 +12,7 @@
#include "RenderBase.h"
static bool s_bFogRangeAdjustChanged;
+static bool s_bViewPortChanged;
static int nLightsChanged[2]; // min,max
PixelShaderConstants PixelShaderManager::constants;
@@ -26,6 +27,7 @@ void PixelShaderManager::Init()
void PixelShaderManager::Dirty()
{
s_bFogRangeAdjustChanged = true;
+ s_bViewPortChanged = true;
nLightsChanged[0] = 0; nLightsChanged[1] = 0x80;
SetColorChanged(0, 0);
@@ -133,6 +135,13 @@ void PixelShaderManager::SetConstants(u32 components)
nLightsChanged[0] = nLightsChanged[1] = -1;
}
}
+
+ if(s_bViewPortChanged)
+ {
+ constants.zbias[1][0] = xfregs.viewport.farZ / 16777216.0f;
+ constants.zbias[1][1] = xfregs.viewport.zRange / 16777216.0f;
+ dirty = true;
+ }
}
// This one is high in profiles (0.5%).
@@ -183,10 +192,7 @@ void PixelShaderManager::SetZTextureBias()
void PixelShaderManager::SetViewportChanged()
{
- constants.zbias[1][0] = xfregs.viewport.farZ / 16777216.0f;
- constants.zbias[1][1] = xfregs.viewport.zRange / 16777216.0f;
- dirty = true;
-
+ s_bViewPortChanged = true;
s_bFogRangeAdjustChanged = true; // TODO: Shouldn't be necessary with an accurate fog range adjust implementation
}