Add caps for texture size limits and other caps in the 6.28 table.

BUG=angle:658

Change-Id: Ia265fe1d3713db7701b41e8430d6d186f352ab4a
Reviewed-on: https://chromium-review.googlesource.com/201363
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index 630330c..012a0d9 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -2595,7 +2595,7 @@
 
               default:
                 if (attachment < GL_COLOR_ATTACHMENT0_EXT ||
-                    (attachment - GL_COLOR_ATTACHMENT0_EXT) >= context->getMaximumRenderTargets())
+                    (attachment - GL_COLOR_ATTACHMENT0_EXT) >= context->getCaps().maxColorAttachments)
                 {
                     return gl::error(GL_INVALID_ENUM);
                 }
@@ -7860,7 +7860,7 @@
             switch (buffer)
             {
               case GL_COLOR:
-                if (drawbuffer < 0 || drawbuffer >= static_cast<GLint>(context->getMaximumRenderTargets()))
+                if (drawbuffer < 0 || static_cast<GLuint>(drawbuffer) >= context->getCaps().maxDrawBuffers)
                 {
                     return gl::error(GL_INVALID_VALUE);
                 }
@@ -7903,7 +7903,7 @@
             switch (buffer)
             {
               case GL_COLOR:
-                if (drawbuffer < 0 || drawbuffer >= static_cast<GLint>(context->getMaximumRenderTargets()))
+                if (drawbuffer < 0 || static_cast<GLuint>(drawbuffer) >= context->getCaps().maxDrawBuffers)
                 {
                     return gl::error(GL_INVALID_VALUE);
                 }
@@ -7940,7 +7940,7 @@
             switch (buffer)
             {
               case GL_COLOR:
-                if (drawbuffer < 0 || drawbuffer >= static_cast<GLint>(context->getMaximumRenderTargets()))
+                if (drawbuffer < 0 || static_cast<GLuint>(drawbuffer) >= context->getCaps().maxDrawBuffers)
                 {
                     return gl::error(GL_INVALID_VALUE);
                 }
@@ -9486,7 +9486,7 @@
                 return;
             }
 
-            int maxDimension = context->getMaximumRenderbufferDimension();
+            GLuint maxDimension = context->getCaps().maxRenderbufferSize;
             context->invalidateFrameBuffer(target, numAttachments, attachments, 0, 0, maxDimension, maxDimension);
         }
     }
@@ -9811,7 +9811,7 @@
 
         if (context)
         {
-            if (n < 0 || (unsigned int)n > context->getMaximumRenderTargets())
+            if (n < 0 || static_cast<GLuint>(n) > context->getCaps().maxDrawBuffers)
             {
                 return gl::error(GL_INVALID_VALUE);
             }
@@ -9842,12 +9842,12 @@
 
             gl::Framebuffer *framebuffer = context->getDrawFramebuffer();
 
-            for (int colorAttachment = 0; colorAttachment < n; colorAttachment++)
+            for (unsigned int colorAttachment = 0; colorAttachment < static_cast<unsigned int>(n); colorAttachment++)
             {
                 framebuffer->setDrawBufferState(colorAttachment, bufs[colorAttachment]);
             }
 
-            for (int colorAttachment = n; colorAttachment < (int)context->getMaximumRenderTargets(); colorAttachment++)
+            for (unsigned int colorAttachment = n; colorAttachment < context->getCaps().maxDrawBuffers; colorAttachment++)
             {
                 framebuffer->setDrawBufferState(colorAttachment, GL_NONE);
             }