Re-enable optimization for detecting nop state changes in fragment
and vertex programs.
Change-Id: Ic5b9ecf564d121d7a00a1eed92afb4c4783ce8bc
diff --git a/rsProgramFragment.cpp b/rsProgramFragment.cpp
index 8151f06..cbe33c7 100644
--- a/rsProgramFragment.cpp
+++ b/rsProgramFragment.cpp
@@ -97,7 +97,7 @@
}
glTexEnvi(GL_POINT_SPRITE_OES, GL_COORD_REPLACE_OES, mPointSpriteEnable);
#endif //ANDROID_RS_BUILD_FOR_HOST
-
+
}
mTextures[ct]->uploadCheck(rsc);
glBindTexture(GL_TEXTURE_2D, mTextures[ct]->getTextureID());
@@ -153,7 +153,7 @@
//LOGE("sgl2 frag1 %x", glGetError());
if ((state->mLast.get() == this) && !mDirty) {
- //return;
+ return;
}
state->mLast.set(this);
@@ -300,7 +300,7 @@
void ProgramFragment::serialize(OStream *stream) const
{
-
+
}
ProgramFragment *ProgramFragment::createFromStream(Context *rsc, IStream *stream)
diff --git a/rsProgramVertex.cpp b/rsProgramVertex.cpp
index b8d1461..85d90c7 100644
--- a/rsProgramVertex.cpp
+++ b/rsProgramVertex.cpp
@@ -221,7 +221,7 @@
{
//LOGE("sgl2 vtx1 %x", glGetError());
if ((state->mLast.get() == this) && !mDirty) {
- //return;
+ return;
}
rsc->checkError("ProgramVertex::setupGL2 start");