Added support for packed integer vertex attributes.

Signed-off-by: Jamie Madill
Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
Author: Geoff Lang

git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2125 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index d01df47..3d0d0c2 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -6818,6 +6818,8 @@
           case GL_HALF_FLOAT:
           case GL_INT:
           case GL_UNSIGNED_INT:
+          case GL_INT_2_10_10_10_REV:
+          case GL_UNSIGNED_INT_2_10_10_10_REV:
             if (context && context->getClientVersion() < 3)
             {
                 return gl::error(GL_INVALID_ENUM);
@@ -6835,6 +6837,11 @@
             return gl::error(GL_INVALID_VALUE);
         }
 
+        if ((type == GL_INT_2_10_10_10_REV || type == GL_UNSIGNED_INT_2_10_10_10_REV) && size != 4)
+        {
+            return gl::error(GL_INVALID_OPERATION);
+        }
+
         if (context)
         {
             context->setVertexAttribState(index, context->getArrayBuffer(), size, type,
@@ -7967,6 +7974,8 @@
           case GL_UNSIGNED_SHORT:
           case GL_INT:
           case GL_UNSIGNED_INT:
+          case GL_INT_2_10_10_10_REV:
+          case GL_UNSIGNED_INT_2_10_10_10_REV:
             break;
           default:
             return gl::error(GL_INVALID_ENUM);
@@ -7977,6 +7986,11 @@
             return gl::error(GL_INVALID_VALUE);
         }
 
+        if ((type == GL_INT_2_10_10_10_REV || type == GL_UNSIGNED_INT_2_10_10_10_REV) && size != 4)
+        {
+            return gl::error(GL_INVALID_OPERATION);
+        }
+
         if (context)
         {
             context->setVertexAttribState(index, context->getArrayBuffer(), size, type, false, true,