Don't reset texture width/height unless the size is different

This commit is contained in:
raven02 2013-11-11 21:12:43 +08:00
parent 9afe69fa62
commit 2bca62b26e

View File

@ -1042,9 +1042,15 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) {
}
case GE_CMD_TEXSIZE0:
gstate_c.curTextureWidth = gstate.getTextureWidth(0);
gstate_c.curTextureHeight = gstate.getTextureHeight(0);
shaderManager_->DirtyUniform(DIRTY_UVSCALEOFFSET);
// Render to texture may have overridden the width/height.
// Don't reset it unless the size is different / the texture has changed.
if (diff || gstate_c.textureChanged) {
gstate_c.curTextureWidth = gstate.getTextureWidth(0);
gstate_c.curTextureHeight = gstate.getTextureHeight(0);
shaderManager_->DirtyUniform(DIRTY_UVSCALEOFFSET);
// We will need to reset the texture now.
gstate_c.textureChanged = true;
}
//fall thru - ignoring the mipmap sizes for now
case GE_CMD_TEXSIZE1:
@ -1054,7 +1060,8 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) {
case GE_CMD_TEXSIZE5:
case GE_CMD_TEXSIZE6:
case GE_CMD_TEXSIZE7:
gstate_c.textureChanged = true;
if (diff)
gstate_c.textureChanged = true;
break;
case GE_CMD_ZBUFPTR: