Refactor VertexAttribute to split the "current value" for generic attributes into its own class.

VAOs in GLES 3 do not store the current values, so these must be handled separately from other Vertex
Attribute data.

TRAC #23390

Signed-off-by: Shannon Woods
Signed-off-by: Geoff Lang
Authored-by: Jamie Madill
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index f2c9723..72e35ab 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -5878,9 +5878,12 @@
                 *params = (GLfloat)attribState.mBoundBuffer.id();
                 break;
               case GL_CURRENT_VERTEX_ATTRIB:
-                for (int i = 0; i < 4; ++i)
                 {
-                    params[i] = attribState.mCurrentValue.FloatValues[i];
+                    const gl::VertexAttribCurrentValueData &currentValueData = context->getVertexAttribCurrentValue(index);
+                    for (int i = 0; i < 4; ++i)
+                    {
+                        params[i] = currentValueData.FloatValues[i];
+                    }
                 }
                 break;
               case GL_VERTEX_ATTRIB_ARRAY_DIVISOR:
@@ -5936,10 +5939,13 @@
                 *params = attribState.mBoundBuffer.id();
                 break;
               case GL_CURRENT_VERTEX_ATTRIB:
-                for (int i = 0; i < 4; ++i)
                 {
-                    float currentValue = attribState.mCurrentValue.FloatValues[i];
-                    params[i] = (GLint)(currentValue > 0.0f ? floor(currentValue + 0.5f) : ceil(currentValue - 0.5f));
+                    const gl::VertexAttribCurrentValueData &currentValueData = context->getVertexAttribCurrentValue(index);
+                    for (int i = 0; i < 4; ++i)
+                    {
+                        float currentValue = currentValueData.FloatValues[i];
+                        params[i] = (GLint)(currentValue > 0.0f ? floor(currentValue + 0.5f) : ceil(currentValue - 0.5f));
+                    }
                 }
                 break;
               case GL_VERTEX_ATTRIB_ARRAY_DIVISOR: