Cache glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, int*).
BUG: https://buganizer.corp.google.com/issues/27418143
If we don't, the chatter over the pipe will
kill framerate.
I believe this is OK for the emulator,
as the parameter is dependent on only the
GPU hardware.
Change-Id: I9bd74de6317316902bddf54b915ef509625cee52
diff --git a/system/GLESv2_enc/GL2Encoder.cpp b/system/GLESv2_enc/GL2Encoder.cpp
index a239445..6c84e82 100755
--- a/system/GLESv2_enc/GL2Encoder.cpp
+++ b/system/GLESv2_enc/GL2Encoder.cpp
@@ -271,6 +271,12 @@
*ptr = state->getBoundTexture(GL_TEXTURE_EXTERNAL_OES);
break;
+ case GL_MAX_VERTEX_ATTRIBS:
+ if (!ctx->m_state->getClientStateParameter<GLint>(param, ptr)) {
+ ctx->m_glGetIntegerv_enc(self, param, ptr);
+ ctx->m_state->setMaxVertexAttribs(*ptr);
+ }
+ break;
default:
if (!ctx->m_state->getClientStateParameter<GLint>(param, ptr)) {
ctx->m_glGetIntegerv_enc(self, param, ptr);