Remove more obsolete code
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6153 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
014e87157c
commit
6a695eff49
|
@ -34,7 +34,6 @@ static bool s_bFogColorChanged;
|
|||
static bool s_bFogParamChanged;
|
||||
static float lastDepthRange[2]; // 0 = far z, 1 = far - near
|
||||
static float lastRGBAfull[2][4][4];
|
||||
static float lastCustomTexScale[8][2];
|
||||
static u8 s_nTexDimsChanged;
|
||||
static u8 s_nIndTexScaleChanged;
|
||||
static u32 lastAlpha;
|
||||
|
@ -43,8 +42,6 @@ static u32 lastZBias;
|
|||
|
||||
void PixelShaderManager::Init()
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
lastCustomTexScale[i][0] = lastCustomTexScale[i][1] = 1.0f;
|
||||
lastAlpha = 0;
|
||||
memset(lastTexDims, 0, sizeof(lastTexDims));
|
||||
lastZBias = 0;
|
||||
|
@ -55,8 +52,8 @@ void PixelShaderManager::Init()
|
|||
void PixelShaderManager::Dirty()
|
||||
{
|
||||
s_nColorsChanged[0] = s_nColorsChanged[1] = 15;
|
||||
s_nTexDimsChanged = true;
|
||||
s_nIndTexScaleChanged = true;
|
||||
s_nTexDimsChanged = 0xFF;
|
||||
s_nIndTexScaleChanged = 0xFF;
|
||||
s_nIndTexMtxChanged = 15;
|
||||
s_bAlphaChanged = s_bZBiasChanged = s_bZTextureTypeChanged = s_bDepthRangeChanged = true;
|
||||
s_bFogColorChanged = s_bFogParamChanged = true;
|
||||
|
@ -210,9 +207,6 @@ void PixelShaderManager::SetConstants()
|
|||
}
|
||||
s_bFogParamChanged = false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
lastCustomTexScale[i][0] = lastCustomTexScale[i][1] = 1.0f;
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetPSTextureDims(int texid)
|
||||
|
@ -224,8 +218,8 @@ void PixelShaderManager::SetPSTextureDims(int texid)
|
|||
TCoordInfo& tc = bpmem.texcoords[texid];
|
||||
fdims[0] = 1.0f / (float)(lastTexDims[texid] & 0xffff);
|
||||
fdims[1] = 1.0f / (float)((lastTexDims[texid] >> 16) & 0xfff);
|
||||
fdims[2] = (float)(tc.s.scale_minus_1 + 1) * lastCustomTexScale[texid][0];
|
||||
fdims[3] = (float)(tc.t.scale_minus_1 + 1) * lastCustomTexScale[texid][1];
|
||||
fdims[2] = (float)(tc.s.scale_minus_1 + 1);
|
||||
fdims[3] = (float)(tc.t.scale_minus_1 + 1);
|
||||
|
||||
PRIM_LOG("texdims%d: %f %f %f %f\n", texid, fdims[0], fdims[1], fdims[2], fdims[3]);
|
||||
SetPSConstant4fv(C_TEXDIMS + texid, fdims);
|
||||
|
@ -276,16 +270,6 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height, u32 wra
|
|||
}
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetCustomTexScale(int texmapid, float x, float y)
|
||||
{
|
||||
if (lastCustomTexScale[texmapid][0] != x || lastCustomTexScale[texmapid][1] != y)
|
||||
{
|
||||
s_nTexDimsChanged |= 1 << texmapid;
|
||||
lastCustomTexScale[texmapid][0] = x;
|
||||
lastCustomTexScale[texmapid][1] = y;
|
||||
}
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetZTextureBias(u32 bias)
|
||||
{
|
||||
if (lastZBias != bias)
|
||||
|
|
|
@ -41,7 +41,6 @@ public:
|
|||
static void SetAlpha(const AlphaFunc& alpha);
|
||||
static void SetDestAlpha(const ConstantAlpha& alpha);
|
||||
static void SetTexDims(int texmapid, u32 width, u32 height, u32 wraps, u32 wrapt);
|
||||
static void SetCustomTexScale(int texmapid, float x, float y);
|
||||
static void SetZTextureBias(u32 bias);
|
||||
static void SetViewport(float* viewport,int VIndex = -1);
|
||||
static void SetIndMatrixChanged(int matrixidx);
|
||||
|
|
|
@ -41,14 +41,12 @@ public:
|
|||
unsigned int w, h, fmt, MipLevels;
|
||||
int Scaledw, Scaledh;
|
||||
|
||||
float scaleX, scaleY; // for hires texutres
|
||||
|
||||
bool isRenderTarget;
|
||||
bool isNonPow2;
|
||||
|
||||
TCacheEntry() : texture(NULL), addr(0), size_in_bytes(0), hash(0), paletteHash(0), oldpixel(0),
|
||||
frameCount(0), w(0), h(0), fmt(0), MipLevels(0), Scaledw(0), Scaledh(0),
|
||||
scaleX(1.f), scaleY(1.f), isRenderTarget(false), isNonPow2(true) {}
|
||||
isRenderTarget(false), isNonPow2(true) {}
|
||||
|
||||
void Destroy(bool shutdown);
|
||||
bool IntersectsMemoryRange(u32 range_address, u32 range_size);
|
||||
|
|
|
@ -330,8 +330,6 @@ void Flush()
|
|||
if (tentry)
|
||||
{
|
||||
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
||||
if (tentry->scaleX != 1.0f || tentry->scaleY != 1.0f)
|
||||
PixelShaderManager::SetCustomTexScale(i, tentry->scaleX, tentry->scaleY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -274,8 +274,6 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width,
|
|||
{
|
||||
expandedWidth = width;
|
||||
expandedHeight = height;
|
||||
entry.scaleX = (float) width / oldWidth;
|
||||
entry.scaleY = (float) height / oldHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,8 +42,6 @@ public:
|
|||
int w, h, fmt,MipLevels;
|
||||
int Scaledw, Scaledh;
|
||||
|
||||
float scaleX, scaleY; // Hires texutres need this
|
||||
|
||||
bool isRenderTarget;
|
||||
bool isDynamic;// mofified from cpu
|
||||
bool isNonPow2;
|
||||
|
@ -58,8 +56,6 @@ public:
|
|||
addr = 0;
|
||||
size_in_bytes = 0;
|
||||
frameCount = 0;
|
||||
scaleX = 1.0f;
|
||||
scaleY = 1.0f;
|
||||
isNonPow2 = true;
|
||||
w = 0;
|
||||
h = 0;
|
||||
|
|
|
@ -260,8 +260,6 @@ void Flush()
|
|||
|
||||
if (tentry) {
|
||||
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
||||
if (tentry->scaleX != 1.0f || tentry->scaleY != 1.0f)
|
||||
PixelShaderManager::SetCustomTexScale(i, tentry->scaleX, tentry->scaleY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue