VideoCommon: refactor PixelShaderManager setters

The old way was to use a dirty flag per setter. Now we just update the const buffer per setter directly.
The old optimization isn't needed any more as the setters don't call the backend any more.

The follow parts are rewritten:

Alpha

ZTextureType

zbias

FogParam

FogColor

Color

TexDim

IndMatrix

MaterialColor

FogRangeAdjust

Lights
This commit is contained in:
degasus
2013-10-07 21:57:18 +02:00
parent 15ed0ea9cf
commit cc6c454898
6 changed files with 157 additions and 358 deletions

View File

@ -17,7 +17,6 @@ class PointerWrap;
// The non-API dependent parts.
class PixelShaderManager
{
static void SetPSTextureDims(int texid);
public:
static void Init();
static void Dirty();
@ -41,9 +40,8 @@ public:
static void SetFogColorChanged();
static void SetFogParamChanged();
static void SetFogRangeAdjustChanged();
static void SetColorMatrix(const float* pmatrix);
static void InvalidateXFRange(int start, int end);
static void SetMaterialColorChanged(int index);
static void SetMaterialColorChanged(int index, u32 color);
static PixelShaderConstants constants;
static bool dirty;