[Glide64] Revert some of the checks in TexCache.cpp
This commit is contained in:
parent
9c0a897e57
commit
919a1f9c20
|
@ -501,6 +501,7 @@ void GetTexInfo(int id, int tile)
|
||||||
|
|
||||||
int ChooseBestTmu(int tmu1, int tmu2)
|
int ChooseBestTmu(int tmu1, int tmu2)
|
||||||
{
|
{
|
||||||
|
if (!GfxInitDone) return tmu1;
|
||||||
if (voodoo.tex_UMA) return 0;
|
if (voodoo.tex_UMA) return 0;
|
||||||
|
|
||||||
if (tmu1 >= voodoo.num_tmu) return tmu2;
|
if (tmu1 >= voodoo.num_tmu) return tmu2;
|
||||||
|
@ -732,6 +733,8 @@ void TexCache()
|
||||||
rdp.t1 = tmu_1;
|
rdp.t1 = tmu_1;
|
||||||
|
|
||||||
// SET the combiner
|
// SET the combiner
|
||||||
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
if (rdp.allow_combine)
|
if (rdp.allow_combine)
|
||||||
{
|
{
|
||||||
// Now actually combine
|
// Now actually combine
|
||||||
|
@ -818,19 +821,25 @@ void TexCache()
|
||||||
grTexDetailControl(tmu_0, cmb.dc0_lodbias, cmb.dc0_detailscale, cmb.dc0_detailmax);
|
grTexDetailControl(tmu_0, cmb.dc0_lodbias, cmb.dc0_detailscale, cmb.dc0_detailmax);
|
||||||
grTexLodBiasValue(tmu_0, cmb.lodbias0);
|
grTexLodBiasValue(tmu_0, cmb.lodbias0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((rdp.tex & 1) && tmu_0 < voodoo.num_tmu)
|
if ((rdp.tex & 1) && tmu_0 < voodoo.num_tmu)
|
||||||
{
|
{
|
||||||
if (aTBuff[0] && aTBuff[0]->cache)
|
if (aTBuff[0] && aTBuff[0]->cache)
|
||||||
{
|
{
|
||||||
LRDP(" | |- Hires tex T0 found in cache.\n");
|
LRDP(" | |- Hires tex T0 found in cache.\n");
|
||||||
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
rdp.cur_cache[0] = aTBuff[0]->cache;
|
rdp.cur_cache[0] = aTBuff[0]->cache;
|
||||||
rdp.cur_cache[0]->last_used = frame_count;
|
rdp.cur_cache[0]->last_used = frame_count;
|
||||||
rdp.cur_cache[0]->uses = rdp.debug_n;
|
rdp.cur_cache[0]->uses = rdp.debug_n;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (tex_found[0][tmu_0] != -1)
|
else if (tex_found[0][tmu_0] != -1)
|
||||||
{
|
{
|
||||||
LRDP(" | |- T0 found in cache.\n");
|
LRDP(" | |- T0 found in cache.\n");
|
||||||
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
CACHE_LUT *cache = voodoo.tex_UMA ? &rdp.cache[0][tex_found[0][0]] : &rdp.cache[tmu_0][tex_found[0][tmu_0]];
|
CACHE_LUT *cache = voodoo.tex_UMA ? &rdp.cache[0][tex_found[0][0]] : &rdp.cache[tmu_0][tex_found[0][tmu_0]];
|
||||||
rdp.cur_cache_n[0] = tex_found[0][tmu_0];
|
rdp.cur_cache_n[0] = tex_found[0][tmu_0];
|
||||||
rdp.cur_cache[0] = cache;
|
rdp.cur_cache[0] = cache;
|
||||||
|
@ -841,6 +850,7 @@ void TexCache()
|
||||||
GR_MIPMAPLEVELMASK_BOTH,
|
GR_MIPMAPLEVELMASK_BOTH,
|
||||||
&cache->t_info);
|
&cache->t_info);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
LoadTex(0, tmu_0);
|
LoadTex(0, tmu_0);
|
||||||
}
|
}
|
||||||
|
@ -849,13 +859,18 @@ void TexCache()
|
||||||
if (aTBuff[1] && aTBuff[1]->cache)
|
if (aTBuff[1] && aTBuff[1]->cache)
|
||||||
{
|
{
|
||||||
LRDP(" | |- Hires tex T1 found in cache.\n");
|
LRDP(" | |- Hires tex T1 found in cache.\n");
|
||||||
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
rdp.cur_cache[1] = aTBuff[1]->cache;
|
rdp.cur_cache[1] = aTBuff[1]->cache;
|
||||||
rdp.cur_cache[1]->last_used = frame_count;
|
rdp.cur_cache[1]->last_used = frame_count;
|
||||||
rdp.cur_cache[1]->uses = rdp.debug_n;
|
rdp.cur_cache[1]->uses = rdp.debug_n;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (tex_found[1][tmu_1] != -1)
|
else if (tex_found[1][tmu_1] != -1)
|
||||||
{
|
{
|
||||||
LRDP(" | |- T1 found in cache.\n");
|
LRDP(" | |- T1 found in cache.\n");
|
||||||
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
CACHE_LUT *cache = voodoo.tex_UMA ? &rdp.cache[0][tex_found[1][0]] : &rdp.cache[tmu_1][tex_found[1][tmu_1]];
|
CACHE_LUT *cache = voodoo.tex_UMA ? &rdp.cache[0][tex_found[1][0]] : &rdp.cache[tmu_1][tex_found[1][tmu_1]];
|
||||||
rdp.cur_cache_n[1] = tex_found[1][tmu_1];
|
rdp.cur_cache_n[1] = tex_found[1][tmu_1];
|
||||||
rdp.cur_cache[1] = cache;
|
rdp.cur_cache[1] = cache;
|
||||||
|
@ -866,10 +881,13 @@ void TexCache()
|
||||||
GR_MIPMAPLEVELMASK_BOTH,
|
GR_MIPMAPLEVELMASK_BOTH,
|
||||||
&cache->t_info);
|
&cache->t_info);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
LoadTex(1, tmu_1);
|
LoadTex(1, tmu_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
int tmu_v[2];
|
int tmu_v[2];
|
||||||
|
|
||||||
tmu_v[0] = tmu_0;
|
tmu_v[0] = tmu_0;
|
||||||
|
@ -945,6 +963,7 @@ void TexCache()
|
||||||
if (aTBuff[i] && (rdp.tex&(i + 1)))
|
if (aTBuff[i] && (rdp.tex&(i + 1)))
|
||||||
SelectTBuffTex(aTBuff[i]);
|
SelectTBuffTex(aTBuff[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LRDP(" | +- TexCache End\n");
|
LRDP(" | +- TexCache End\n");
|
||||||
}
|
}
|
||||||
|
@ -1604,6 +1623,8 @@ void LoadTex(int id, int tmu)
|
||||||
cache->lod = lod;
|
cache->lod = lod;
|
||||||
cache->aspect = aspect;
|
cache->aspect = aspect;
|
||||||
|
|
||||||
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
#ifdef TEXTURE_FILTER // Hiroshi Morii <koolsmoky@users.sourceforge.net>
|
#ifdef TEXTURE_FILTER // Hiroshi Morii <koolsmoky@users.sourceforge.net>
|
||||||
if (settings.ghq_use)
|
if (settings.ghq_use)
|
||||||
{
|
{
|
||||||
|
@ -1762,6 +1783,7 @@ void LoadTex(int id, int tmu)
|
||||||
cache->realheight = real_y;
|
cache->realheight = real_y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Load the texture into texture memory
|
// Load the texture into texture memory
|
||||||
|
|
Loading…
Reference in New Issue