GSdx: small mipmapping optimization, half fps maybe, it wasn't done right on my first attempt.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4501 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11 2011-03-28 04:15:36 +00:00
parent cf9600fd9f
commit d7a6b484ce
1 changed files with 8 additions and 7 deletions

View File

@ -382,6 +382,14 @@ bool GSRendererSW::GetScanlineGlobalData(GSScanlineGlobalData& gd)
int mxl = (std::min<int>((int)context->TEX1.MXL, 6) << 16);
int k = context->TEX1.K << 12;
if((int)m_vt.m_lod.x >= (int)context->TEX1.MXL)
{
k = (int)m_vt.m_lod.x << 16; // set lod to max
gd.sel.lcm = 1; // lod is constant
gd.sel.mmin = 1; // tri-linear is meaningless
}
if(gd.sel.mmin == 2)
{
mxl--; // don't sample beyond the last level (TODO: add a dummy level instead?)
@ -395,13 +403,6 @@ bool GSRendererSW::GetScanlineGlobalData(GSScanlineGlobalData& gd)
gd.sel.lcm = 1;
}
if((int)m_vt.m_lod.x >= (int)context->TEX1.MXL)
{
k = (int)m_vt.m_lod.x << 16;
gd.sel.lcm = 1;
}
if(gd.sel.lcm)
{
int lod = std::max<int>(std::min<int>(k, mxl), 0);