Renames current load*Data functions to clarify destination format.

TRAC #22294

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

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1616 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Image.cpp b/src/libGLESv2/renderer/Image.cpp
index 351fb8f..1792837 100644
--- a/src/libGLESv2/renderer/Image.cpp
+++ b/src/libGLESv2/renderer/Image.cpp
@@ -25,8 +25,8 @@
     mActualFormat = GL_NONE;
 }
 
-void Image::loadAlphaData(GLsizei width, GLsizei height,
-                          int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadAlphaDataToBGRA(GLsizei width, GLsizei height,
+                                int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned char *source = NULL;
     unsigned char *dest = NULL;
@@ -45,8 +45,8 @@
     }
 }
 
-void Image::loadAlphaFloatData(GLsizei width, GLsizei height,
-                               int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadAlphaFloatDataToRGBA(GLsizei width, GLsizei height,
+                                     int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const float *source = NULL;
     float *dest = NULL;
@@ -65,8 +65,8 @@
     }
 }
 
-void Image::loadAlphaHalfFloatData(GLsizei width, GLsizei height,
-                                   int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadAlphaHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                         int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned short *source = NULL;
     unsigned short *dest = NULL;
@@ -85,8 +85,8 @@
     }
 }
 
-void Image::loadLuminanceData(GLsizei width, GLsizei height,
-                              int inputPitch, const void *input, size_t outputPitch, void *output, bool native)
+void Image::loadLuminanceDataToNativeOrBGRA(GLsizei width, GLsizei height,
+                                            int inputPitch, const void *input, size_t outputPitch, void *output, bool native)
 {
     const unsigned char *source = NULL;
     unsigned char *dest = NULL;
@@ -113,8 +113,8 @@
     }
 }
 
-void Image::loadLuminanceFloatData(GLsizei width, GLsizei height,
-                                   int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadLuminanceFloatDataToRGBA(GLsizei width, GLsizei height,
+                                         int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const float *source = NULL;
     float *dest = NULL;
@@ -133,8 +133,8 @@
     }
 }
 
-void Image::loadLuminanceHalfFloatData(GLsizei width, GLsizei height,
-                                       int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadLuminanceHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                             int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned short *source = NULL;
     unsigned short *dest = NULL;
@@ -153,8 +153,8 @@
     }
 }
 
-void Image::loadLuminanceAlphaData(GLsizei width, GLsizei height,
-                                   int inputPitch, const void *input, size_t outputPitch, void *output, bool native)
+void Image::loadLuminanceAlphaDataToNativeOrBGRA(GLsizei width, GLsizei height,
+                                                 int inputPitch, const void *input, size_t outputPitch, void *output, bool native)
 {
     const unsigned char *source = NULL;
     unsigned char *dest = NULL;
@@ -181,8 +181,8 @@
     }
 }
 
-void Image::loadLuminanceAlphaFloatData(GLsizei width, GLsizei height,
-                                        int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadLuminanceAlphaFloatDataToRGBA(GLsizei width, GLsizei height,
+                                              int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const float *source = NULL;
     float *dest = NULL;
@@ -201,8 +201,8 @@
     }
 }
 
-void Image::loadLuminanceAlphaHalfFloatData(GLsizei width, GLsizei height,
-                                            int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadLuminanceAlphaHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                                  int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned short *source = NULL;
     unsigned short *dest = NULL;
@@ -221,8 +221,8 @@
     }
 }
 
-void Image::loadRGBUByteData(GLsizei width, GLsizei height,
-                             int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBUByteDataToBGRX(GLsizei width, GLsizei height,
+                                   int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned char *source = NULL;
     unsigned char *dest = NULL;
@@ -241,8 +241,8 @@
     }
 }
 
-void Image::loadRGB565Data(GLsizei width, GLsizei height,
-                           int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGB565DataToBGRA(GLsizei width, GLsizei height,
+                                 int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned short *source = NULL;
     unsigned char *dest = NULL;
@@ -262,8 +262,8 @@
     }
 }
 
-void Image::loadRGBFloatData(GLsizei width, GLsizei height,
-                             int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBFloatDataToRGBA(GLsizei width, GLsizei height,
+                                   int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const float *source = NULL;
     float *dest = NULL;
@@ -282,8 +282,8 @@
     }
 }
 
-void Image::loadRGBHalfFloatData(GLsizei width, GLsizei height,
-                                 int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                       int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned short *source = NULL;
     unsigned short *dest = NULL;
@@ -302,8 +302,8 @@
     }
 }
 
-void Image::loadRGBAUByteData(GLsizei width, GLsizei height,
-                              int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBAUByteDataToBGRA(GLsizei width, GLsizei height,
+                                    int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned int *source = NULL;
     unsigned int *dest = NULL;
@@ -320,8 +320,8 @@
     }
 }
 
-void Image::loadRGBA4444Data(GLsizei width, GLsizei height,
-                             int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBA4444DataToBGRA(GLsizei width, GLsizei height,
+                                   int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned short *source = NULL;
     unsigned char *dest = NULL;
@@ -341,8 +341,8 @@
     }
 }
 
-void Image::loadRGBA5551Data(GLsizei width, GLsizei height,
-                             int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBA5551DataToBGRA(GLsizei width, GLsizei height,
+                                   int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned short *source = NULL;
     unsigned char *dest = NULL;
@@ -362,8 +362,8 @@
     }
 }
 
-void Image::loadRGBAFloatData(GLsizei width, GLsizei height,
-                              int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBAFloatDataToRGBA(GLsizei width, GLsizei height,
+                                    int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const float *source = NULL;
     float *dest = NULL;
@@ -376,8 +376,8 @@
     }
 }
 
-void Image::loadRGBAHalfFloatData(GLsizei width, GLsizei height,
-                                  int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBAHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                        int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned char *source = NULL;
     unsigned char *dest = NULL;
@@ -390,8 +390,8 @@
     }
 }
 
-void Image::loadBGRAData(GLsizei width, GLsizei height,
-                         int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadBGRADataToBGRA(GLsizei width, GLsizei height,
+                               int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned char *source = NULL;
     unsigned char *dest = NULL;
diff --git a/src/libGLESv2/renderer/Image.h b/src/libGLESv2/renderer/Image.h
index 50d3424..ad114f3 100644
--- a/src/libGLESv2/renderer/Image.h
+++ b/src/libGLESv2/renderer/Image.h
@@ -55,48 +55,48 @@
 
     virtual void copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height, gl::Framebuffer *source) = 0;
 
-    static void loadAlphaData(GLsizei width, GLsizei height,
-                              int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadAlphaDataSSE2(GLsizei width, GLsizei height,
-                                  int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadAlphaFloatData(GLsizei width, GLsizei height,
-                                   int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadAlphaHalfFloatData(GLsizei width, GLsizei height,
+    static void loadAlphaDataToBGRA(GLsizei width, GLsizei height,
+                                    int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadAlphaDataToBGRASSE2(GLsizei width, GLsizei height,
+                                        int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadAlphaFloatDataToRGBA(GLsizei width, GLsizei height,
+                                         int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadAlphaHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                             int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadLuminanceDataToNativeOrBGRA(GLsizei width, GLsizei height,
+                                        int inputPitch, const void *input, size_t outputPitch, void *output, bool native);
+    static void loadLuminanceFloatDataToRGBA(GLsizei width, GLsizei height,
+                                             int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadLuminanceHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                                 int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadLuminanceAlphaDataToNativeOrBGRA(GLsizei width, GLsizei height,
+                                             int inputPitch, const void *input, size_t outputPitch, void *output, bool native);
+    static void loadLuminanceAlphaFloatDataToRGBA(GLsizei width, GLsizei height,
+                                                  int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadLuminanceAlphaHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                                      int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBUByteDataToBGRX(GLsizei width, GLsizei height,
                                        int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadLuminanceData(GLsizei width, GLsizei height,
-                                  int inputPitch, const void *input, size_t outputPitch, void *output, bool native);
-    static void loadLuminanceFloatData(GLsizei width, GLsizei height,
-                                       int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadLuminanceHalfFloatData(GLsizei width, GLsizei height,
-                                           int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadLuminanceAlphaData(GLsizei width, GLsizei height,
-                                       int inputPitch, const void *input, size_t outputPitch, void *output, bool native);
-    static void loadLuminanceAlphaFloatData(GLsizei width, GLsizei height,
-                                            int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadLuminanceAlphaHalfFloatData(GLsizei width, GLsizei height,
-                                                int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBUByteData(GLsizei width, GLsizei height,
-                                 int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGB565Data(GLsizei width, GLsizei height,
-                               int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBFloatData(GLsizei width, GLsizei height,
-                                 int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBHalfFloatData(GLsizei width, GLsizei height,
+    static void loadRGB565DataToBGRA(GLsizei width, GLsizei height,
                                      int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBAUByteDataSSE2(GLsizei width, GLsizei height,
-                                      int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBAUByteData(GLsizei width, GLsizei height,
-                                  int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBA4444Data(GLsizei width, GLsizei height,
-                                 int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBA5551Data(GLsizei width, GLsizei height,
-                                 int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBAFloatData(GLsizei width, GLsizei height,
-                                  int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadRGBAHalfFloatData(GLsizei width, GLsizei height,
-                                      int inputPitch, const void *input, size_t outputPitch, void *output);
-    static void loadBGRAData(GLsizei width, GLsizei height,
-                             int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBFloatDataToRGBA(GLsizei width, GLsizei height,
+                                       int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                           int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBAUByteDataToBGRASSE2(GLsizei width, GLsizei height,
+                                            int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBAUByteDataToBGRA(GLsizei width, GLsizei height,
+                                        int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBA4444DataToBGRA(GLsizei width, GLsizei height,
+                                       int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBA5551DataToBGRA(GLsizei width, GLsizei height,
+                                       int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBAFloatDataToRGBA(GLsizei width, GLsizei height,
+                                        int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadRGBAHalfFloatDataToRGBA(GLsizei width, GLsizei height,
+                                            int inputPitch, const void *input, size_t outputPitch, void *output);
+    static void loadBGRADataToBGRA(GLsizei width, GLsizei height,
+                                   int inputPitch, const void *input, size_t outputPitch, void *output);
 
   protected:
     GLsizei mWidth;
diff --git a/src/libGLESv2/renderer/Image11.cpp b/src/libGLESv2/renderer/Image11.cpp
index 8537465..c67e9aa 100644
--- a/src/libGLESv2/renderer/Image11.cpp
+++ b/src/libGLESv2/renderer/Image11.cpp
@@ -124,28 +124,28 @@
         UNIMPLEMENTED(); // TODO - new function for D3D11-supported formats
         break;
       case GL_LUMINANCE8_EXT:
-        loadLuminanceData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData, false);
+        loadLuminanceDataToNativeOrBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData, false);
         break;
       case GL_ALPHA32F_EXT:
-        loadAlphaFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadAlphaFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_LUMINANCE32F_EXT:
         UNIMPLEMENTED(); // TODO - new function for D3D11-supported formats
         break;
       case GL_ALPHA16F_EXT:
-        loadAlphaHalfFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadAlphaHalfFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_LUMINANCE16F_EXT:
-        loadLuminanceHalfFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadLuminanceHalfFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_LUMINANCE8_ALPHA8_EXT:
-        loadLuminanceAlphaData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData, false);
+        loadLuminanceAlphaDataToNativeOrBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData, false);
         break;
       case GL_LUMINANCE_ALPHA32F_EXT:
-        loadLuminanceAlphaFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadLuminanceAlphaFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_LUMINANCE_ALPHA16F_EXT:
-        loadLuminanceAlphaHalfFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadLuminanceAlphaHalfFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_RGB8_OES:
         UNIMPLEMENTED(); // TODO - new function for D3D11-supported formats
@@ -163,19 +163,19 @@
         UNIMPLEMENTED(); // TODO - new function for D3D11-supported formats
         break;
       case GL_BGRA8_EXT:
-        loadBGRAData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadBGRADataToBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_RGB32F_EXT:
         UNIMPLEMENTED(); // TODO - new function for D3D11-supported formats
         break;
       case GL_RGB16F_EXT:
-        loadRGBHalfFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadRGBHalfFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_RGBA32F_EXT:
-        loadRGBAFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadRGBAFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       case GL_RGBA16F_EXT:
-        loadRGBAHalfFloatData(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+        loadRGBAHalfFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
         break;
       default: UNREACHABLE(); 
     }
diff --git a/src/libGLESv2/renderer/Image9.cpp b/src/libGLESv2/renderer/Image9.cpp
index dde8429..a8c2034 100644
--- a/src/libGLESv2/renderer/Image9.cpp
+++ b/src/libGLESv2/renderer/Image9.cpp
@@ -377,74 +377,74 @@
       case GL_ALPHA8_EXT:
         if (gl::supportsSSE2())
         {
-            loadAlphaDataSSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+            loadAlphaDataToBGRASSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         }
         else
         {
-            loadAlphaData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+            loadAlphaDataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         }
         break;
       case GL_LUMINANCE8_EXT:
-        loadLuminanceData(width, height, inputPitch, input, locked.Pitch, locked.pBits, getD3DFormat() == D3DFMT_L8);
+        loadLuminanceDataToNativeOrBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits, getD3DFormat() == D3DFMT_L8);
         break;
       case GL_ALPHA32F_EXT:
-        loadAlphaFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadAlphaFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_LUMINANCE32F_EXT:
-        loadLuminanceFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadLuminanceFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_ALPHA16F_EXT:
-        loadAlphaHalfFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadAlphaHalfFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_LUMINANCE16F_EXT:
-        loadLuminanceHalfFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadLuminanceHalfFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_LUMINANCE8_ALPHA8_EXT:
-        loadLuminanceAlphaData(width, height, inputPitch, input, locked.Pitch, locked.pBits, getD3DFormat() == D3DFMT_A8L8);
+        loadLuminanceAlphaDataToNativeOrBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits, getD3DFormat() == D3DFMT_A8L8);
         break;
       case GL_LUMINANCE_ALPHA32F_EXT:
-        loadLuminanceAlphaFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadLuminanceAlphaFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_LUMINANCE_ALPHA16F_EXT:
-        loadLuminanceAlphaHalfFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadLuminanceAlphaHalfFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_RGB8_OES:
-        loadRGBUByteData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGBUByteDataToBGRX(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_RGB565:
-        loadRGB565Data(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGB565DataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_RGBA8_OES:
         if (gl::supportsSSE2())
         {
-            loadRGBAUByteDataSSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+            loadRGBAUByteDataToBGRASSE2(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         }
         else
         {
-            loadRGBAUByteData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+            loadRGBAUByteDataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         }
         break;
       case GL_RGBA4:
-        loadRGBA4444Data(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGBA4444DataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_RGB5_A1:
-        loadRGBA5551Data(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGBA5551DataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_BGRA8_EXT:
-        loadBGRAData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadBGRADataToBGRA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       // float textures are converted to RGBA, not BGRA, as they're stored that way in D3D
       case GL_RGB32F_EXT:
-        loadRGBFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGBFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_RGB16F_EXT:
-        loadRGBHalfFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGBHalfFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_RGBA32F_EXT:
-        loadRGBAFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGBAFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       case GL_RGBA16F_EXT:
-        loadRGBAHalfFloatData(width, height, inputPitch, input, locked.Pitch, locked.pBits);
+        loadRGBAHalfFloatDataToRGBA(width, height, inputPitch, input, locked.Pitch, locked.pBits);
         break;
       default: UNREACHABLE(); 
     }
diff --git a/src/libGLESv2/renderer/ImageSSE2.cpp b/src/libGLESv2/renderer/ImageSSE2.cpp
index bf69d4f..309f677 100644
--- a/src/libGLESv2/renderer/ImageSSE2.cpp
+++ b/src/libGLESv2/renderer/ImageSSE2.cpp
@@ -16,8 +16,8 @@
 namespace rx
 {
 
-void Image::loadRGBAUByteDataSSE2(GLsizei width, GLsizei height,
-                                  int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadRGBAUByteDataToBGRASSE2(GLsizei width, GLsizei height,
+                                        int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned int *source = NULL;
     unsigned int *dest = NULL;
@@ -58,8 +58,8 @@
     }
 }
 
-void Image::loadAlphaDataSSE2(GLsizei width, GLsizei height,
-                              int inputPitch, const void *input, size_t outputPitch, void *output)
+void Image::loadAlphaDataToBGRASSE2(GLsizei width, GLsizei height,
+                                    int inputPitch, const void *input, size_t outputPitch, void *output)
 {
     const unsigned char *source = NULL;
     unsigned int *dest = NULL;