Added support for renderbuffer formats used by the CTS.

TRAC #22890
Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2158 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/utilities.cpp b/src/libGLESv2/utilities.cpp
index 8fa7f53..53e9b7e 100644
--- a/src/libGLESv2/utilities.cpp
+++ b/src/libGLESv2/utilities.cpp
@@ -372,9 +372,15 @@
       case GL_RGBA32F_EXT:                      return sizeof(float) * 4;
       case GL_RGBA16F_EXT:                      return sizeof(unsigned short) * 4;
       case GL_BGRA8_EXT:                        return sizeof(unsigned char) * 4;
+      case GL_SRGB8_ALPHA8:                     return sizeof(unsigned char) * 4;
+      case GL_RGB10_A2:                         return sizeof(unsigned char) * 4;
+      case GL_RG8:                              return sizeof(unsigned char) * 2;
+      case GL_R8:                               return sizeof(unsigned char);
       case GL_BGRA4_ANGLEX:                     return sizeof(unsigned short);
       case GL_BGR5_A1_ANGLEX:                   return sizeof(unsigned short);
-      default: UNREACHABLE();
+      default:
+        UNIMPLEMENTED();   // TODO: Remaining ES3 formats
+        UNREACHABLE();
     }
 
     return 0;
@@ -556,15 +562,19 @@
       case GL_RGB565:
       case GL_RGB8_OES:
       case GL_RGBA8_OES:
+      case GL_BGRA8_EXT:
+      case GL_SRGB8_ALPHA8:
+      case GL_RGB10_A2:
+      case GL_RG8:
+      case GL_R8:
         return true;
       case GL_DEPTH_COMPONENT16:
       case GL_STENCIL_INDEX8:
       case GL_DEPTH24_STENCIL8_OES:
         return false;
-      case GL_BGRA8_EXT:
-          return true;
       default:
-        UNIMPLEMENTED();
+        UNIMPLEMENTED();   // TODO: Remaining ES3 formats
+        UNREACHABLE();
     }
 
     return false;