Make Framebuffer size check ES2-only.

This is an ES2-only incompleteness check. We also need to require
matching dimensions in D3D11, but make this an implementation
specific check. Also make all implementation specific errors
'UNSUPPORTED' since that catches all "non-ES" framebuffer
restrictions.

Note that we can't be conformant here in D3D11 currently, since the
spec only makes an exception for mismatching formats for UNSUPPORTED,
not for size checks. However, we don't have an easy solution.

BUG=angleproject:1225

Change-Id: Ic80a04bce397fc12643b010c874f432033babc5d
Reviewed-on: https://chromium-review.googlesource.com/313990
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
index c41b3a6..e5f9932 100644
--- a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
+++ b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
@@ -302,14 +302,14 @@
     return gl::Error(GL_NO_ERROR);
 }
 
-GLenum FramebufferD3D::checkStatus() const
+bool FramebufferD3D::checkStatus() const
 {
     // if we have both a depth and stencil buffer, they must refer to the same object
     // since we only support packed_depth_stencil and not separate depth and stencil
     if (mData.getDepthAttachment() != nullptr && mData.getStencilAttachment() != nullptr &&
         mData.getDepthStencilAttachment() == nullptr)
     {
-        return GL_FRAMEBUFFER_UNSUPPORTED;
+        return false;
     }
 
     // D3D11 does not allow for overlapping RenderTargetViews, so ensure uniqueness
@@ -326,13 +326,19 @@
                     (attachment.id() == prevAttachment.id() &&
                      attachment.type() == prevAttachment.type()))
                 {
-                    return GL_FRAMEBUFFER_UNSUPPORTED;
+                    return false;
                 }
             }
         }
     }
 
-    return GL_FRAMEBUFFER_COMPLETE;
+    // D3D requires all render targets to have the same dimensions.
+    if (!mData.attachmentsHaveSameDimensions())
+    {
+        return false;
+    }
+
+    return true;
 }
 
 const gl::AttachmentList &FramebufferD3D::getColorAttachmentsForRender(