Blend conformance bugfixes.

Trac #11327

Fixes a bug where color conversion swapped blue and green values.
Fixes a bug where CONSTANT_COLOR/CONSTANT_ALPHA conflict guard
failed to check for ONE_MINUS variants.

Author: Shannon Woods
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch

git-svn-id: https://angleproject.googlecode.com/svn/trunk@27 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/libGLESv2/libGLESv2.cpp b/libGLESv2/libGLESv2.cpp
index 338161d..444c707 100644
--- a/libGLESv2/libGLESv2.cpp
+++ b/libGLESv2/libGLESv2.cpp
@@ -390,10 +390,16 @@
             return error(GL_INVALID_ENUM);
         }
 
-        if ((srcRGB == GL_CONSTANT_COLOR && dstRGB == GL_CONSTANT_ALPHA) ||
-            (srcRGB == GL_CONSTANT_ALPHA && dstRGB == GL_CONSTANT_COLOR))
+        bool constantColorUsed = (srcRGB == GL_CONSTANT_COLOR || srcRGB == GL_ONE_MINUS_CONSTANT_COLOR ||
+                                  dstRGB == GL_CONSTANT_COLOR || dstRGB == GL_ONE_MINUS_CONSTANT_COLOR);
+
+        bool constantAlphaUsed = (srcRGB == GL_CONSTANT_ALPHA || srcRGB == GL_ONE_MINUS_CONSTANT_ALPHA ||
+                                  dstRGB == GL_CONSTANT_ALPHA || dstRGB == GL_ONE_MINUS_CONSTANT_ALPHA);
+
+        if (constantColorUsed && constantAlphaUsed)
         {
-            UNIMPLEMENTED();
+            ERR("Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA and GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR invalid under WebGL");
+            return error(GL_INVALID_OPERATION);
         }
 
         gl::Context *context = gl::getContext();