Don't dirty the texture on texmapenable.

Tales of Phantasia X flips on and off texturing during battle transitions.
This causes tons of needless rehashes.
This commit is contained in:
Unknown W. Brackets 2014-04-13 13:01:18 -07:00
parent b6dc7eba8b
commit 2f72da8087
2 changed files with 4 additions and 6 deletions

View file

@ -115,7 +115,7 @@ static const CommandTableEntry commandTable[] = {
// These affect the fragment shader so need flushing.
{GE_CMD_CLEARMODE, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_TEXTUREMAPENABLE, FLAG_FLUSHBEFOREONCHANGE | FLAG_EXECUTEONCHANGE},
{GE_CMD_TEXTUREMAPENABLE, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_FOGENABLE, FLAG_FLUSHBEFOREONCHANGE},
{GE_CMD_TEXMODE, FLAG_FLUSHBEFOREONCHANGE | FLAG_EXECUTEONCHANGE},
{GE_CMD_TEXSHADELS, FLAG_FLUSHBEFOREONCHANGE},
@ -918,7 +918,7 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) {
break;
case GE_CMD_TEXTUREMAPENABLE:
gstate_c.textureChanged = true;
// Don't need to dirty the texture here, already dirtied at list start/etc.
break;
case GE_CMD_LIGHTINGENABLE:

View file

@ -166,10 +166,8 @@ static inline bool blendColorSimilar(const Vec3f &a, const Vec3f &b, float margi
void TransformDrawEngine::ApplyDrawState(int prim) {
// TODO: All this setup is soon so expensive that we'll need dirty flags, or simply do it in the command writes where we detect dirty by xoring. Silly to do all this work on every drawcall.
if (gstate_c.textureChanged && !gstate.isModeClear()) {
if (gstate.isTextureMapEnabled()) {
textureCache_->SetTexture();
}
if (gstate_c.textureChanged && !gstate.isModeClear() && gstate.isTextureMapEnabled()) {
textureCache_->SetTexture();
gstate_c.textureChanged = false;
}