Add support for GL_UNSIGNED_INT_2_10_10_10_REV textures.

TRAC #22956

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

git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2356 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Renderer11.cpp b/src/libGLESv2/renderer/Renderer11.cpp
index 830cabb..6b8d771 100644
--- a/src/libGLESv2/renderer/Renderer11.cpp
+++ b/src/libGLESv2/renderer/Renderer11.cpp
@@ -3660,6 +3660,7 @@
 {
     unsigned char* byteData = reinterpret_cast<unsigned char*>(outData);
     unsigned short* shortData = reinterpret_cast<unsigned short*>(outData);
+    unsigned int* intData = reinterpret_cast<unsigned int*>(outData);
 
     switch (format)
     {
@@ -3673,6 +3674,13 @@
             byteData[4 * x + y * outputPitch + 3] = static_cast<unsigned char>(255 * color.alpha + 0.5f);
             break;
 
+          case GL_UNSIGNED_INT_2_10_10_10_REV:
+            intData[x + y * outputPitch / sizeof(unsigned int)] = (static_cast<unsigned int>(   3 * color.alpha) << 30) |
+                                                                  (static_cast<unsigned int>(1023 * color.red  ) << 20) |
+                                                                  (static_cast<unsigned int>(1023 * color.green) << 10) |
+                                                                  (static_cast<unsigned int>(1023 * color.blue ) <<  0);
+            break;
+
           default:
             ERR("WritePixelColor not implemented for format GL_RGBA and type 0x%X.", type);
             UNIMPLEMENTED();