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/renderer/InputLayoutCache.cpp b/src/libGLESv2/renderer/InputLayoutCache.cpp
index a9d4857..28b0767 100644
--- a/src/libGLESv2/renderer/InputLayoutCache.cpp
+++ b/src/libGLESv2/renderer/InputLayoutCache.cpp
@@ -79,6 +79,9 @@
             BufferStorage11 *bufferStorage = attributes[i].storage ? BufferStorage11::makeBufferStorage11(attributes[i].storage) : NULL;
 
             D3D11_INPUT_CLASSIFICATION inputClass = attributes[i].divisor > 0 ? D3D11_INPUT_PER_INSTANCE_DATA : D3D11_INPUT_PER_VERTEX_DATA;
+            DXGI_FORMAT dxgiFormat = attributes[i].attribute->mArrayEnabled ?
+                                     VertexBuffer11::getAttributeDXGIFormat(*attributes[i].attribute) :
+                                     VertexBuffer11::getCurrentValueDXGIFormat(attributes[i].currentValueType);
 
             // Record the type of the associated vertex shader vector in our key
             // This will prevent mismatched vertex shaders from using the same input layout
@@ -87,7 +90,7 @@
 
             ilKey.elements[ilKey.elementCount].SemanticName = semanticName;
             ilKey.elements[ilKey.elementCount].SemanticIndex = sortedSemanticIndices[i];
-            ilKey.elements[ilKey.elementCount].Format = vertexBuffer->getDXGIFormat(*attributes[i].attribute);
+            ilKey.elements[ilKey.elementCount].Format = dxgiFormat;
             ilKey.elements[ilKey.elementCount].InputSlot = i;
             ilKey.elements[ilKey.elementCount].AlignedByteOffset = 0;
             ilKey.elements[ilKey.elementCount].InputSlotClass = inputClass;