Remove a bunch of freshly-obsolete code

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6148 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check
2010-08-29 19:34:54 +00:00
parent 3058a926cf
commit 4229d9e01e
11 changed files with 50 additions and 163 deletions

View File

@ -41,11 +41,6 @@ static u32 lastAlpha;
static u32 lastTexDims[8]; // width | height << 16 | wrap_s << 28 | wrap_t << 30
static u32 lastZBias;
// lower byte describes if a texture is nonpow2 or pow2
// next byte describes whether the repeat wrap mode is enabled for the s channel
// next byte is for t channel
static u32 s_texturemask = 0;
void PixelShaderManager::Init()
{
for (int i = 0; i < 8; i++)
@ -53,7 +48,6 @@ void PixelShaderManager::Init()
lastAlpha = 0;
memset(lastTexDims, 0, sizeof(lastTexDims));
lastZBias = 0;
s_texturemask = 0;
memset(lastRGBAfull, 0, sizeof(lastRGBAfull));
Dirty();
}
@ -223,26 +217,15 @@ void PixelShaderManager::SetConstants()
void PixelShaderManager::SetPSTextureDims(int texid)
{
// non pow 2 textures - texdims.xy are the real texture dimensions used for wrapping
// pow 2 textures - texdims.xy are reciprocals of the real texture dimensions
// both - texdims.zw are the scaled dimensions
// texdims.xy are reciprocals of the real texture dimensions
// texdims.zw are the scaled dimensions
float fdims[4];
if (s_texturemask & (1 << texid))
{
TCoordInfo& tc = bpmem.texcoords[texid];
fdims[0] = (float)(lastTexDims[texid] & 0xffff);
fdims[1] = (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];
}
else
{
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];
}
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];
PRIM_LOG("texdims%d: %f %f %f %f\n", texid, fdims[0], fdims[1], fdims[2], fdims[3]);
SetPSConstant4fv(C_TEXDIMS + texid, fdims);
@ -362,23 +345,6 @@ void PixelShaderManager::SetZTextureTypeChanged()
s_bZTextureTypeChanged = true;
}
void PixelShaderManager::SetTexturesUsed(u32 nonpow2tex)
{
if (s_texturemask != nonpow2tex)
{
for (int i = 0; i < 8; ++i)
{
if (nonpow2tex & (0x10101 << i))
{
// this check was previously implicit, but should it be here?
if (s_nTexDimsChanged)
s_nTexDimsChanged |= 1 << i;
}
}
s_texturemask = nonpow2tex;
}
}
void PixelShaderManager::SetTexCoordChanged(u8 texmapid)
{
s_nTexDimsChanged |= 1 << texmapid;
@ -399,8 +365,3 @@ void PixelShaderManager::SetColorMatrix(const float* pmatrix, const float* pfCon
SetMultiPSConstant4fv(C_COLORMATRIX,4,pmatrix);
SetPSConstant4fv(C_COLORMATRIX+4, pfConstAdd);
}
u32 PixelShaderManager::GetTextureMask()
{
return s_texturemask;
}