Fix the order of the channels in readPixelColor, which was messing up BGRA to RGBA readPixels.

TRAC #22529

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

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1850 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Renderer11.cpp b/src/libGLESv2/renderer/Renderer11.cpp
index 69819ad..4b4169e 100644
--- a/src/libGLESv2/renderer/Renderer11.cpp
+++ b/src/libGLESv2/renderer/Renderer11.cpp
@@ -2714,10 +2714,10 @@
       case DXGI_FORMAT_R8G8B8A8_UNORM:
         {
             unsigned int rgba = *reinterpret_cast<const unsigned int*>(data + 4 * x + y * inputPitch);
-            outColor->red =   (rgba & 0xFF000000) * (1.0f / 0xFF000000);
-            outColor->green = (rgba & 0x00FF0000) * (1.0f / 0x00FF0000);
-            outColor->blue =  (rgba & 0x0000FF00) * (1.0f / 0x0000FF00);
-            outColor->alpha = (rgba & 0x000000FF) * (1.0f / 0x000000FF);
+            outColor->red =   (rgba & 0x000000FF) * (1.0f / 0x000000FF);
+            outColor->green = (rgba & 0x0000FF00) * (1.0f / 0x0000FF00);
+            outColor->blue =  (rgba & 0x00FF0000) * (1.0f / 0x00FF0000);
+            outColor->alpha = (rgba & 0xFF000000) * (1.0f / 0xFF000000);
         }
         break;
 
@@ -2760,10 +2760,10 @@
       case DXGI_FORMAT_B8G8R8A8_UNORM:
         {
             unsigned int bgra = *reinterpret_cast<const unsigned int*>(data + 4 * x + y * inputPitch);
-            outColor->red =   (bgra & 0x0000FF00) * (1.0f / 0x0000FF00);
-            outColor->blue =  (bgra & 0xFF000000) * (1.0f / 0xFF000000);
-            outColor->green = (bgra & 0x00FF0000) * (1.0f / 0x00FF0000);
-            outColor->alpha = (bgra & 0x000000FF) * (1.0f / 0x000000FF);
+            outColor->red =   (bgra & 0x00FF0000) * (1.0f / 0x00FF0000);
+            outColor->blue =  (bgra & 0x000000FF) * (1.0f / 0x000000FF);
+            outColor->green = (bgra & 0x0000FF00) * (1.0f / 0x0000FF00);
+            outColor->alpha = (bgra & 0xFF000000) * (1.0f / 0xFF000000);
         }
         break;