More micro-optimization for draw call validation.

Mostly inlining checks on the hot draw call path.
Slight increase in draw call validation performance. (Up to 13%)

Bug: angleproject:2747
Change-Id: I34c4d7f412c3bca5e559e9bfb5689c0618bb7536
Reviewed-on: https://chromium-review.googlesource.com/1171506
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index f15fad0..0cb16bc 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -359,6 +359,7 @@
       mWebGLContext(GetWebGLContext(attribs)),
       mExtensionsEnabled(GetExtensionsEnabled(attribs, mWebGLContext)),
       mMemoryProgramCache(memoryProgramCache),
+      mStateCache(this),
       mVertexArrayObserverBinding(this, kVertexArraySubjectIndex),
       mDrawFramebufferObserverBinding(this, kDrawFramebufferSubjectIndex),
       mReadFramebufferObserverBinding(this, kReadFramebufferSubjectIndex),
@@ -7790,12 +7791,13 @@
 }
 
 // StateCache implementation.
-StateCache::StateCache()
+StateCache::StateCache(Context *context)
     : mCachedHasAnyEnabledClientAttrib(false),
       mCachedNonInstancedVertexElementLimit(0),
       mCachedInstancedVertexElementLimit(0),
       mCachedBasicDrawStatesError(kInvalidPointer)
 {
+    updateValidDrawModes(context);
 }
 
 StateCache::~StateCache() = default;