StateManagerGL: Remove setGenericShaderState.
We can mutate the BitSetIterator as it clears dirty bits. This removes
the risk of doing a double state update. Improves the proformance of
the GL back-end state update.
Also do an early-out before calling syncDrawArraysState.
Bug: angleproject:2763
Change-Id: Idd25bdd67a6aceff05529a533260b661b07c2928
Reviewed-on: https://chromium-review.googlesource.com/c/1262740
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index c5b180b..902d903 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -5296,14 +5296,14 @@
Error Context::prepareForDispatch()
{
- ANGLE_TRY(syncState(mComputeDirtyBits, mComputeDirtyObjects));
+ ANGLE_TRY(syncDirtyObjects(mComputeDirtyObjects));
if (isRobustResourceInitEnabled())
{
ANGLE_TRY(mGLState.clearUnclearedActiveTextures(this));
}
- return NoError();
+ return syncDirtyBits(mComputeDirtyBits);
}
void Context::dispatchCompute(GLuint numGroupsX, GLuint numGroupsY, GLuint numGroupsZ)