Remove the clientVersion parameter from the format utils.

clientVersion was only useful for intitial validation of formats and not
required for queries.  Only use the client version and caps structure to
validate if a format is available and then trust that it is supported past
the validation layer.

Fixed some inconsistancies between tables such as missing formats or
incorrect load functions in the ES3 tables.

BUG=angle:659

Change-Id: I8d33c902156ee6fb41efe937d93b0586191726e5
Reviewed-on: https://chromium-review.googlesource.com/201167
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp b/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
index 0eff838..2199dd8 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
@@ -377,10 +377,10 @@
 
     D3D11_SHADER_RESOURCE_VIEW_DESC sourceSRVDesc;
     source->GetDesc(&sourceSRVDesc);
-    GLenum sourceInternalFormat = d3d11_gl::GetInternalFormat(sourceSRVDesc.Format, mRenderer->getCurrentClientVersion());
+    GLenum sourceInternalFormat = d3d11_gl::GetInternalFormat(sourceSRVDesc.Format);
 
     GLenum shaderType = GL_NONE;
-    switch (gl::GetComponentType(sourceInternalFormat, mRenderer->getCurrentClientVersion()))
+    switch (gl::GetComponentType(sourceInternalFormat))
     {
       case GL_UNSIGNED_NORMALIZED:
       case GL_SIGNED_NORMALIZED:
@@ -516,11 +516,11 @@
     // be GL_XXXX_INTEGER but it does not tell us if it is signed or unsigned.
     D3D11_SHADER_RESOURCE_VIEW_DESC sourceSRVDesc;
     source->GetDesc(&sourceSRVDesc);
-    GLenum sourceInternalFormat = d3d11_gl::GetInternalFormat(sourceSRVDesc.Format, mRenderer->getCurrentClientVersion());
+    GLenum sourceInternalFormat = d3d11_gl::GetInternalFormat(sourceSRVDesc.Format);
 
     BlitParameters parameters = { 0 };
     parameters.mDestinationFormat = destFormat;
-    parameters.mSignedInteger = gl::GetComponentType(sourceInternalFormat, mRenderer->getCurrentClientVersion()) == GL_INT;
+    parameters.mSignedInteger = gl::GetComponentType(sourceInternalFormat) == GL_INT;
     parameters.m3DBlit = sourceArea.depth > 1;
 
     BlitShaderMap::const_iterator i = mBlitShaderMap.find(parameters);
diff --git a/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp b/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
index 37eb1b1..2f241f9 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
@@ -200,8 +200,6 @@
                                                              clearParams.scissor.x + clearParams.scissor.width < framebufferSize.width ||
                                                              clearParams.scissor.y + clearParams.scissor.height < framebufferSize.height);
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
     std::vector<RenderTarget11*> maskedClearRenderTargets;
     RenderTarget11* maskedClearDepthStencil = NULL;
 
@@ -223,7 +221,7 @@
 
                 GLenum internalFormat = attachment->getInternalFormat();
                 GLenum actualFormat = attachment->getActualFormat();
-                GLenum componentType = gl::GetComponentType(internalFormat, clientVersion);
+                GLenum componentType = gl::GetComponentType(internalFormat);
                 if (clearParams.colorClearType == GL_FLOAT &&
                     !(componentType == GL_FLOAT || componentType == GL_UNSIGNED_NORMALIZED || componentType == GL_SIGNED_NORMALIZED))
                 {
@@ -231,10 +229,10 @@
                         "point to floating point values (color attachment %u has internal format 0x%X).", colorAttachment, internalFormat);
                 }
 
-                GLuint internalRedBits = gl::GetRedBits(internalFormat, clientVersion);
-                GLuint internalGreenBits = gl::GetGreenBits(internalFormat, clientVersion);
-                GLuint internalBlueBits = gl::GetBlueBits(internalFormat, clientVersion);
-                GLuint internalAlphaBits = gl::GetAlphaBits(internalFormat, clientVersion);
+                GLuint internalRedBits = gl::GetRedBits(internalFormat);
+                GLuint internalGreenBits = gl::GetGreenBits(internalFormat);
+                GLuint internalBlueBits = gl::GetBlueBits(internalFormat);
+                GLuint internalAlphaBits = gl::GetAlphaBits(internalFormat);
 
                 if ((internalRedBits   == 0 || !clearParams.colorMaskRed) &&
                     (internalGreenBits == 0 || !clearParams.colorMaskGreen) &&
@@ -266,10 +264,10 @@
 
                     // Check if the actual format has a channel that the internal format does not and set them to the
                     // default values
-                    GLuint actualRedBits   = gl::GetRedBits(actualFormat, clientVersion);
-                    GLuint actualGreenBits = gl::GetGreenBits(actualFormat, clientVersion);
-                    GLuint actualBlueBits  = gl::GetBlueBits(actualFormat, clientVersion);
-                    GLuint actualAlphaBits = gl::GetAlphaBits(actualFormat, clientVersion);
+                    GLuint actualRedBits   = gl::GetRedBits(actualFormat);
+                    GLuint actualGreenBits = gl::GetGreenBits(actualFormat);
+                    GLuint actualBlueBits  = gl::GetBlueBits(actualFormat);
+                    GLuint actualAlphaBits = gl::GetAlphaBits(actualFormat);
 
                     const float clearValues[4] =
                     {
@@ -299,7 +297,7 @@
 
             GLenum actualFormat = attachment->getActualFormat();
 
-            unsigned int stencilUnmasked = frameBuffer->hasStencil() ? (1 << gl::GetStencilBits(actualFormat, clientVersion)) - 1 : 0;
+            unsigned int stencilUnmasked = frameBuffer->hasStencil() ? (1 << gl::GetStencilBits(actualFormat)) - 1 : 0;
             bool needMaskedStencilClear = clearParams.clearStencil && (clearParams.stencilWriteMask & stencilUnmasked) != stencilUnmasked;
 
             if (needScissoredClear || needMaskedStencilClear)
@@ -451,8 +449,6 @@
 
 ID3D11BlendState *Clear11::getBlendState(const gl::ClearParameters &clearParams, const std::vector<RenderTarget11*>& rts)
 {
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
     ClearBlendInfo blendKey = { 0 };
     for (unsigned int i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; i++)
     {
@@ -460,10 +456,10 @@
         {
             GLint internalFormat = rts[i]->getInternalFormat();
 
-            blendKey.maskChannels[i][0] = clearParams.clearColor ? (clearParams.colorMaskRed   && gl::GetRedBits(internalFormat, clientVersion)   > 0) : false;
-            blendKey.maskChannels[i][1] = clearParams.clearColor ? (clearParams.colorMaskGreen && gl::GetGreenBits(internalFormat, clientVersion) > 0) : false;
-            blendKey.maskChannels[i][2] = clearParams.clearColor ? (clearParams.colorMaskBlue  && gl::GetBlueBits(internalFormat, clientVersion)  > 0) : false;
-            blendKey.maskChannels[i][3] = clearParams.clearColor ? (clearParams.colorMaskAlpha && gl::GetAlphaBits(internalFormat, clientVersion) > 0) : false;
+            blendKey.maskChannels[i][0] = clearParams.clearColor ? (clearParams.colorMaskRed   && gl::GetRedBits(internalFormat)   > 0) : false;
+            blendKey.maskChannels[i][1] = clearParams.clearColor ? (clearParams.colorMaskGreen && gl::GetGreenBits(internalFormat) > 0) : false;
+            blendKey.maskChannels[i][2] = clearParams.clearColor ? (clearParams.colorMaskBlue  && gl::GetBlueBits(internalFormat)  > 0) : false;
+            blendKey.maskChannels[i][3] = clearParams.clearColor ? (clearParams.colorMaskAlpha && gl::GetAlphaBits(internalFormat) > 0) : false;
         }
         else
         {
diff --git a/src/libGLESv2/renderer/d3d/d3d11/Image11.cpp b/src/libGLESv2/renderer/d3d/d3d11/Image11.cpp
index a159c36..4cc5ba7 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/Image11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/Image11.cpp
@@ -40,7 +40,7 @@
     return static_cast<rx::Image11*>(img);
 }
 
-void Image11::generateMipmap(GLuint clientVersion, Image11 *dest, Image11 *src)
+void Image11::generateMipmap(Image11 *dest, Image11 *src)
 {
     ASSERT(src->getDXGIFormat() == dest->getDXGIFormat());
     ASSERT(src->getWidth() == 1 || src->getWidth() / 2 == dest->getWidth());
@@ -118,7 +118,6 @@
         forceRelease)
     {
         mRenderer = Renderer11::makeRenderer11(renderer);
-        GLuint clientVersion = mRenderer->getCurrentClientVersion();
 
         mWidth = width;
         mHeight = height;
@@ -127,9 +126,9 @@
         mTarget = target;
 
         // compute the d3d format that will be used
-        mDXGIFormat = gl_d3d11::GetTexFormat(internalformat, clientVersion);
-        mActualFormat = d3d11_gl::GetInternalFormat(mDXGIFormat, clientVersion);
-        mRenderable = gl_d3d11::GetRTVFormat(internalformat, clientVersion) != DXGI_FORMAT_UNKNOWN;
+        mDXGIFormat = gl_d3d11::GetTexFormat(internalformat);
+        mActualFormat = d3d11_gl::GetInternalFormat(mDXGIFormat);
+        mRenderable = gl_d3d11::GetRTVFormat(internalformat) != DXGI_FORMAT_UNKNOWN;
 
         SafeRelease(mStagingTexture);
         mDirty = gl_d3d11::RequiresTextureDataInitialization(mInternalFormat);
@@ -154,12 +153,11 @@
 void Image11::loadData(GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
                        GLint unpackAlignment, GLenum type, const void *input)
 {
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, type, clientVersion, width, unpackAlignment);
-    GLsizei inputDepthPitch = gl::GetDepthPitch(mInternalFormat, type, clientVersion, width, height, unpackAlignment);
+    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, type, width, unpackAlignment);
+    GLsizei inputDepthPitch = gl::GetDepthPitch(mInternalFormat, type, width, height, unpackAlignment);
     GLuint outputPixelSize = d3d11::GetFormatPixelBytes(mDXGIFormat);
 
-    LoadImageFunction loadFunction = d3d11::GetImageLoadFunction(mInternalFormat, type, clientVersion);
+    LoadImageFunction loadFunction = d3d11::GetImageLoadFunction(mInternalFormat, type);
     ASSERT(loadFunction != NULL);
 
     D3D11_MAPPED_SUBRESOURCE mappedImage;
@@ -179,9 +177,8 @@
 void Image11::loadCompressedData(GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
                                  const void *input)
 {
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, GL_UNSIGNED_BYTE, clientVersion, width, 1);
-    GLsizei inputDepthPitch = gl::GetDepthPitch(mInternalFormat, GL_UNSIGNED_BYTE, clientVersion, width, height, 1);
+    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, GL_UNSIGNED_BYTE, width, 1);
+    GLsizei inputDepthPitch = gl::GetDepthPitch(mInternalFormat, GL_UNSIGNED_BYTE, width, height, 1);
 
     GLuint outputPixelSize = d3d11::GetFormatPixelBytes(mDXGIFormat);
     GLuint outputBlockWidth = d3d11::GetBlockWidth(mDXGIFormat);
@@ -190,7 +187,7 @@
     ASSERT(xoffset % outputBlockWidth == 0);
     ASSERT(yoffset % outputBlockHeight == 0);
 
-    LoadImageFunction loadFunction = d3d11::GetImageLoadFunction(mInternalFormat, GL_UNSIGNED_BYTE, clientVersion);
+    LoadImageFunction loadFunction = d3d11::GetImageLoadFunction(mInternalFormat, GL_UNSIGNED_BYTE);
     ASSERT(loadFunction != NULL);
 
     D3D11_MAPPED_SUBRESOURCE mappedImage;
@@ -287,12 +284,11 @@
         }
 
         // determine the offset coordinate into the destination buffer
-        GLuint clientVersion = mRenderer->getCurrentClientVersion();
-        GLsizei rowOffset = gl::GetPixelBytes(mActualFormat, clientVersion) * xoffset;
+        GLsizei rowOffset = gl::GetPixelBytes(mActualFormat) * xoffset;
         void *dataOffset = static_cast<unsigned char*>(mappedImage.pData) + mappedImage.RowPitch * yoffset + rowOffset + zoffset * mappedImage.DepthPitch;
 
-        GLenum format = gl::GetFormat(mInternalFormat, clientVersion);
-        GLenum type = gl::GetType(mInternalFormat, clientVersion);
+        GLenum format = gl::GetFormat(mInternalFormat);
+        GLenum type = gl::GetType(mInternalFormat);
 
         mRenderer->readPixels(source, x, y, width, height, format, type, mappedImage.RowPitch, gl::PixelPackState(), dataOffset);
 
@@ -354,8 +350,8 @@
             {
                 std::vector<D3D11_SUBRESOURCE_DATA> initialData;
                 std::vector< std::vector<BYTE> > textureData;
-                d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getCurrentClientVersion(), width, height,
-                                                  mDepth, lodOffset + 1, &initialData, &textureData);
+                d3d11::GenerateInitialTextureData(mInternalFormat, width, height, mDepth,
+                                                  lodOffset + 1, &initialData, &textureData);
 
                 result = device->CreateTexture3D(&desc, initialData.data(), &newTexture);
             }
@@ -395,8 +391,8 @@
             {
                 std::vector<D3D11_SUBRESOURCE_DATA> initialData;
                 std::vector< std::vector<BYTE> > textureData;
-                d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getCurrentClientVersion(), width, height,
-                                                  1, lodOffset + 1, &initialData, &textureData);
+                d3d11::GenerateInitialTextureData(mInternalFormat, width, height, 1,
+                                                  lodOffset + 1, &initialData, &textureData);
 
                 result = device->CreateTexture2D(&desc, initialData.data(), &newTexture);
             }
diff --git a/src/libGLESv2/renderer/d3d/d3d11/Image11.h b/src/libGLESv2/renderer/d3d/d3d11/Image11.h
index 300774c..0ac7ac0 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/Image11.h
+++ b/src/libGLESv2/renderer/d3d/d3d11/Image11.h
@@ -34,7 +34,7 @@
 
     static Image11 *makeImage11(Image *img);
 
-    static void generateMipmap(GLuint clientVersion, Image11 *dest, Image11 *src);
+    static void generateMipmap(Image11 *dest, Image11 *src);
 
     virtual bool isDirty() const;
 
diff --git a/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp b/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
index 66107ff..566ec26 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
@@ -122,7 +122,7 @@
     float texelCenterX = 0.5f / static_cast<float>(destSize.width - 1);
     float texelCenterY = 0.5f / static_cast<float>(destSize.height - 1);
 
-    unsigned int bytesPerPixel = gl::GetPixelBytes(internalFormat, 3);
+    unsigned int bytesPerPixel = gl::GetPixelBytes(internalFormat);
     unsigned int alignmentBytes = static_cast<unsigned int>(unpack.alignment);
     unsigned int alignmentPixels = (alignmentBytes <= bytesPerPixel ? 1 : alignmentBytes / bytesPerPixel);
 
@@ -148,7 +148,6 @@
         return false;
     }
 
-    int clientVersion = mRenderer->getCurrentClientVersion();
     const gl::Buffer &sourceBuffer = *unpack.pixelBuffer.get();
 
     ASSERT(mRenderer->supportsFastCopyBufferToTexture(destinationFormat));
@@ -158,10 +157,10 @@
 
     // The SRV must be in the proper read format, which may be different from the destination format
     // EG: for half float data, we can load full precision floats with implicit conversion
-    GLenum unsizedFormat = gl::GetFormat(destinationFormat, clientVersion);
-    GLenum sourceFormat = gl::GetSizedInternalFormat(unsizedFormat, sourcePixelsType, clientVersion);
+    GLenum unsizedFormat = gl::GetFormat(destinationFormat);
+    GLenum sourceFormat = gl::GetSizedInternalFormat(unsizedFormat, sourcePixelsType);
 
-    DXGI_FORMAT srvFormat = gl_d3d11::GetSRVFormat(sourceFormat, clientVersion);
+    DXGI_FORMAT srvFormat = gl_d3d11::GetSRVFormat(sourceFormat);
     ASSERT(srvFormat != DXGI_FORMAT_UNKNOWN);
     BufferStorage11 *bufferStorage11 = BufferStorage11::makeBufferStorage11(sourceBuffer.getStorage());
     ID3D11ShaderResourceView *bufferSRV = bufferStorage11->getSRV(srvFormat);
@@ -237,8 +236,7 @@
 
 ID3D11PixelShader *PixelTransfer11::findBufferToTexturePS(GLenum internalFormat) const
 {
-    int clientVersion = mRenderer->getCurrentClientVersion();
-    GLenum componentType = gl::GetComponentType(internalFormat, clientVersion);
+    GLenum componentType = gl::GetComponentType(internalFormat);
 
     if (componentType == GL_SIGNED_NORMALIZED || componentType == GL_UNSIGNED_NORMALIZED)
     {
diff --git a/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.cpp b/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.cpp
index 7b6ad78..78a7357 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.cpp
@@ -38,7 +38,7 @@
 const unsigned int RenderStateCache::kMaxDepthStencilStates = 4096;
 const unsigned int RenderStateCache::kMaxSamplerStates = 4096;
 
-RenderStateCache::RenderStateCache() : mRenderer(NULL), mCounter(0),
+RenderStateCache::RenderStateCache() : mDevice(NULL), mCounter(0),
                                        mBlendStateCache(kMaxBlendStates, hashBlendState, compareBlendStates),
                                        mRasterizerStateCache(kMaxRasterizerStates, hashRasterizerState, compareRasterizerStates),
                                        mDepthStencilStateCache(kMaxDepthStencilStates, hashDepthStencilState, compareDepthStencilStates),
@@ -51,10 +51,10 @@
     clear();
 }
 
-void RenderStateCache::initialize(Renderer11 *renderer)
+void RenderStateCache::initialize(ID3D11Device *device)
 {
     clear();
-    mRenderer = renderer;
+    mDevice = device;
 }
 
 void RenderStateCache::clear()
@@ -81,7 +81,7 @@
 
 ID3D11BlendState *RenderStateCache::getBlendState(const gl::Framebuffer *framebuffer, const gl::BlendState &blendState)
 {
-    if (!mRenderer)
+    if (!mDevice)
     {
         ERR("RenderStateCache is not initialized.");
         return NULL;
@@ -89,8 +89,6 @@
 
     bool mrt = false;
 
-    int clientVersion = mRenderer->getCurrentClientVersion();
-
     BlendStateKey key = { 0 };
     key.blendState = blendState;
     for (unsigned int i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; i++)
@@ -103,10 +101,10 @@
                 mrt = true;
             }
 
-            key.rtChannels[i][0] = attachment->getRedSize(clientVersion)   > 0;
-            key.rtChannels[i][1] = attachment->getGreenSize(clientVersion) > 0;
-            key.rtChannels[i][2] = attachment->getBlueSize(clientVersion)  > 0;
-            key.rtChannels[i][3] = attachment->getAlphaSize(clientVersion) > 0;
+            key.rtChannels[i][0] = attachment->getRedSize()   > 0;
+            key.rtChannels[i][1] = attachment->getGreenSize() > 0;
+            key.rtChannels[i][2] = attachment->getBlueSize()  > 0;
+            key.rtChannels[i][3] = attachment->getAlphaSize() > 0;
         }
         else
         {
@@ -171,8 +169,7 @@
         }
 
         ID3D11BlendState *dx11BlendState = NULL;
-        ID3D11Device *device = mRenderer->getDevice();
-        HRESULT result = device->CreateBlendState(&blendDesc, &dx11BlendState);
+        HRESULT result = mDevice->CreateBlendState(&blendDesc, &dx11BlendState);
         if (FAILED(result) || !dx11BlendState)
         {
             ERR("Unable to create a ID3D11BlendState, HRESULT: 0x%X.", result);
@@ -201,7 +198,7 @@
 
 ID3D11RasterizerState *RenderStateCache::getRasterizerState(const gl::RasterizerState &rasterState, bool scissorEnabled)
 {
-    if (!mRenderer)
+    if (!mDevice)
     {
         ERR("RenderStateCache is not initialized.");
         return NULL;
@@ -267,8 +264,7 @@
         }
 
         ID3D11RasterizerState *dx11RasterizerState = NULL;
-        ID3D11Device *device = mRenderer->getDevice();
-        HRESULT result = device->CreateRasterizerState(&rasterDesc, &dx11RasterizerState);
+        HRESULT result = mDevice->CreateRasterizerState(&rasterDesc, &dx11RasterizerState);
         if (FAILED(result) || !dx11RasterizerState)
         {
             ERR("Unable to create a ID3D11RasterizerState, HRESULT: 0x%X.", result);
@@ -297,7 +293,7 @@
 
 ID3D11DepthStencilState *RenderStateCache::getDepthStencilState(const gl::DepthStencilState &dsState)
 {
-    if (!mRenderer)
+    if (!mDevice)
     {
         ERR("RenderStateCache is not initialized.");
         return NULL;
@@ -346,8 +342,7 @@
         dsDesc.BackFace.StencilFunc = gl_d3d11::ConvertComparison(dsState.stencilBackFunc);
 
         ID3D11DepthStencilState *dx11DepthStencilState = NULL;
-        ID3D11Device *device = mRenderer->getDevice();
-        HRESULT result = device->CreateDepthStencilState(&dsDesc, &dx11DepthStencilState);
+        HRESULT result = mDevice->CreateDepthStencilState(&dsDesc, &dx11DepthStencilState);
         if (FAILED(result) || !dx11DepthStencilState)
         {
             ERR("Unable to create a ID3D11DepthStencilState, HRESULT: 0x%X.", result);
@@ -376,7 +371,7 @@
 
 ID3D11SamplerState *RenderStateCache::getSamplerState(const gl::SamplerState &samplerState)
 {
-    if (!mRenderer)
+    if (!mDevice)
     {
         ERR("RenderStateCache is not initialized.");
         return NULL;
@@ -425,8 +420,7 @@
         samplerDesc.MaxLOD = samplerState.maxLod;
 
         ID3D11SamplerState *dx11SamplerState = NULL;
-        ID3D11Device *device = mRenderer->getDevice();
-        HRESULT result = device->CreateSamplerState(&samplerDesc, &dx11SamplerState);
+        HRESULT result = mDevice->CreateSamplerState(&samplerDesc, &dx11SamplerState);
         if (FAILED(result) || !dx11SamplerState)
         {
             ERR("Unable to create a ID3D11DepthStencilState, HRESULT: 0x%X.", result);
diff --git a/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.h b/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.h
index b96be8e..e6380fb 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.h
+++ b/src/libGLESv2/renderer/d3d/d3d11/RenderStateCache.h
@@ -28,7 +28,7 @@
     RenderStateCache();
     virtual ~RenderStateCache();
 
-    void initialize(Renderer11 *renderer);
+    void initialize(ID3D11Device *device);
     void clear();
 
     ID3D11BlendState *getBlendState(const gl::Framebuffer *framebuffer, const gl::BlendState &blendState);
@@ -101,7 +101,7 @@
                                SamplerStateEqualityFunction> SamplerStateMap;
     SamplerStateMap mSamplerStateCache;
 
-    Renderer11 *mRenderer;
+    ID3D11Device *mDevice;
 };
 
 }
diff --git a/src/libGLESv2/renderer/d3d/d3d11/RenderTarget11.cpp b/src/libGLESv2/renderer/d3d/d3d11/RenderTarget11.cpp
index e349ac2..6aa75ae 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/RenderTarget11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/RenderTarget11.cpp
@@ -219,8 +219,8 @@
         mDepth = depth;
         mSamples = samples;
 
-        mInternalFormat = d3d11_gl::GetInternalFormat(desc.Format, renderer->getCurrentClientVersion());
-        mActualFormat = d3d11_gl::GetInternalFormat(desc.Format, renderer->getCurrentClientVersion());
+        mInternalFormat = d3d11_gl::GetInternalFormat(desc.Format);
+        mActualFormat = d3d11_gl::GetInternalFormat(desc.Format);
     }
 }
 
@@ -265,8 +265,8 @@
         mDepth = depth;
         mSamples = samples;
 
-        mInternalFormat = d3d11_gl::GetInternalFormat(desc.Format, renderer->getCurrentClientVersion());
-        mActualFormat = d3d11_gl::GetInternalFormat(desc.Format, renderer->getCurrentClientVersion());
+        mInternalFormat = d3d11_gl::GetInternalFormat(desc.Format);
+        mActualFormat = d3d11_gl::GetInternalFormat(desc.Format);
     }
 }
 
@@ -278,12 +278,10 @@
     mDepthStencil = NULL;
     mShaderResource = NULL;
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
-    DXGI_FORMAT texFormat = gl_d3d11::GetTexFormat(internalFormat, clientVersion);
-    DXGI_FORMAT srvFormat = gl_d3d11::GetSRVFormat(internalFormat, clientVersion);
-    DXGI_FORMAT rtvFormat = gl_d3d11::GetRTVFormat(internalFormat, clientVersion);
-    DXGI_FORMAT dsvFormat = gl_d3d11::GetDSVFormat(internalFormat, clientVersion);
+    DXGI_FORMAT texFormat = gl_d3d11::GetTexFormat(internalFormat);
+    DXGI_FORMAT srvFormat = gl_d3d11::GetSRVFormat(internalFormat);
+    DXGI_FORMAT rtvFormat = gl_d3d11::GetRTVFormat(internalFormat);
+    DXGI_FORMAT dsvFormat = gl_d3d11::GetDSVFormat(internalFormat);
 
     DXGI_FORMAT multisampleFormat = (dsvFormat != DXGI_FORMAT_UNKNOWN ? dsvFormat : rtvFormat);
     int supportedSamples = mRenderer->getNearestSupportedSamples(multisampleFormat, samples);
@@ -408,7 +406,7 @@
     mDepth = 1;
     mInternalFormat = internalFormat;
     mSamples = supportedSamples;
-    mActualFormat = d3d11_gl::GetInternalFormat(texFormat, renderer->getCurrentClientVersion());
+    mActualFormat = d3d11_gl::GetInternalFormat(texFormat);
     mSubresourceIndex = D3D11CalcSubresource(0, 0, 1);
 }
 
diff --git a/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
index b26a8ae..092a028 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
@@ -292,7 +292,7 @@
 // to reset the scene status and ensure the default states are reset.
 void Renderer11::initializeDevice()
 {
-    mStateCache.initialize(this);
+    mStateCache.initialize(mDevice);
     mInputLayoutCache.initialize(mDevice, mDeviceContext);
 
     ASSERT(!mVertexDataManager && !mIndexDataManager);
@@ -342,13 +342,9 @@
 
                 if (depthStencilFormatOK)
                 {
-                    // FIXME: parse types from context version
-                    ASSERT(d3d11_gl::GetInternalFormat(renderTargetFormat, 2) == d3d11_gl::GetInternalFormat(renderTargetFormat, 3));
-                    ASSERT(d3d11_gl::GetInternalFormat(depthStencilFormat, 2) == d3d11_gl::GetInternalFormat(depthStencilFormat, 3));
-
                     ConfigDesc newConfig;
-                    newConfig.renderTargetFormat = d3d11_gl::GetInternalFormat(renderTargetFormat, getCurrentClientVersion());
-                    newConfig.depthStencilFormat = d3d11_gl::GetInternalFormat(depthStencilFormat, getCurrentClientVersion());
+                    newConfig.renderTargetFormat = d3d11_gl::GetInternalFormat(renderTargetFormat);
+                    newConfig.depthStencilFormat = d3d11_gl::GetInternalFormat(depthStencilFormat);
                     newConfig.multiSample = 0;     // FIXME: enumerate multi-sampling
                     newConfig.fastConfig = true;   // Assume all DX11 format conversions to be fast
                     newConfig.es3Capable = true;
@@ -2147,7 +2143,7 @@
 
 GLsizei Renderer11::getMaxSupportedFormatSamples(GLenum internalFormat) const
 {
-    DXGI_FORMAT format = gl_d3d11::GetRenderableFormat(internalFormat, getCurrentClientVersion());
+    DXGI_FORMAT format = gl_d3d11::GetRenderableFormat(internalFormat);
     MultisampleSupportMap::const_iterator iter = mMultisampleSupportMap.find(format);
     return (iter != mMultisampleSupportMap.end()) ? iter->second.maxSupportedSamples : 0;
 }
@@ -2157,10 +2153,10 @@
     unsigned int numCounts = 0;
 
     // D3D11 supports multisampling for signed and unsigned format, but ES 3.0 does not
-    GLenum componentType = gl::GetComponentType(internalFormat, getCurrentClientVersion());
+    GLenum componentType = gl::GetComponentType(internalFormat);
     if (componentType != GL_INT && componentType != GL_UNSIGNED_INT)
     {
-        DXGI_FORMAT format = gl_d3d11::GetRenderableFormat(internalFormat, getCurrentClientVersion());
+        DXGI_FORMAT format = gl_d3d11::GetRenderableFormat(internalFormat);
         MultisampleSupportMap::const_iterator iter = mMultisampleSupportMap.find(format);
 
         if (iter != mMultisampleSupportMap.end())
@@ -2182,13 +2178,13 @@
 void Renderer11::getSampleCounts(GLenum internalFormat, GLsizei bufSize, GLint *params) const
 {
     // D3D11 supports multisampling for signed and unsigned format, but ES 3.0 does not
-    GLenum componentType = gl::GetComponentType(internalFormat, getCurrentClientVersion());
+    GLenum componentType = gl::GetComponentType(internalFormat);
     if (componentType == GL_INT || componentType == GL_UNSIGNED_INT)
     {
         return;
     }
 
-    DXGI_FORMAT format = gl_d3d11::GetRenderableFormat(internalFormat, getCurrentClientVersion());
+    DXGI_FORMAT format = gl_d3d11::GetRenderableFormat(internalFormat);
     MultisampleSupportMap::const_iterator iter = mMultisampleSupportMap.find(format);
 
     if (iter != mMultisampleSupportMap.end())
@@ -2806,10 +2802,8 @@
 {
     ASSERT(getCaps().extensions.pixelBufferObject);
 
-    GLuint clientVersion = getCurrentClientVersion();
-
     // sRGB formats do not work with D3D11 buffer SRVs
-    if (gl::GetColorEncoding(internalFormat, clientVersion) == GL_SRGB)
+    if (gl::GetColorEncoding(internalFormat) == GL_SRGB)
     {
         return false;
     }
@@ -2821,7 +2815,7 @@
     }
 
     // We skip all 3-channel formats since sometimes format support is missing
-    if (gl::GetComponentCount(internalFormat, clientVersion) == 3)
+    if (gl::GetComponentCount(internalFormat) == 3)
     {
         return false;
     }
@@ -2988,7 +2982,7 @@
 {
     Image11 *dest11 = Image11::makeImage11(dest);
     Image11 *src11 = Image11::makeImage11(src);
-    Image11::generateMipmap(getCurrentClientVersion(), dest11, src11);
+    Image11::generateMipmap(dest11, src11);
 }
 
 TextureStorage *Renderer11::createTextureStorage2D(SwapChain *swapChain)
@@ -3141,13 +3135,11 @@
         inputPitch = static_cast<int>(mapping.RowPitch);
     }
 
-    GLuint clientVersion = getCurrentClientVersion();
+    GLenum sourceInternalFormat = d3d11_gl::GetInternalFormat(textureDesc.Format);
+    GLenum sourceFormat = gl::GetFormat(sourceInternalFormat);
+    GLenum sourceType = gl::GetType(sourceInternalFormat);
 
-    GLenum sourceInternalFormat = d3d11_gl::GetInternalFormat(textureDesc.Format, clientVersion);
-    GLenum sourceFormat = gl::GetFormat(sourceInternalFormat, clientVersion);
-    GLenum sourceType = gl::GetType(sourceInternalFormat, clientVersion);
-
-    GLuint sourcePixelSize = gl::GetPixelBytes(sourceInternalFormat, clientVersion);
+    GLuint sourcePixelSize = gl::GetPixelBytes(sourceInternalFormat);
 
     if (sourceFormat == params.format && sourceType == params.type)
     {
@@ -3159,8 +3151,8 @@
     }
     else
     {
-        GLenum destInternalFormat = gl::GetSizedInternalFormat(params.format, params.type, clientVersion);
-        GLuint destPixelSize = gl::GetPixelBytes(destInternalFormat, clientVersion);
+        GLenum destInternalFormat = gl::GetSizedInternalFormat(params.format, params.type);
+        GLuint destPixelSize = gl::GetPixelBytes(destInternalFormat);
 
         ColorCopyFunction fastCopyFunc = d3d11::GetFastCopyFunction(textureDesc.Format, params.format, params.type);
         if (fastCopyFunc)
@@ -3180,7 +3172,7 @@
         else
         {
             ColorReadFunction readFunc = d3d11::GetColorReadFunction(textureDesc.Format);
-            ColorWriteFunction writeFunc = gl::GetColorWriteFunction(params.format, params.type, clientVersion);
+            ColorWriteFunction writeFunc = gl::GetColorWriteFunction(params.format, params.type);
 
             unsigned char temp[16]; // Maximum size of any Color<T> type used.
             META_ASSERT(sizeof(temp) >= sizeof(gl::ColorF)  &&
@@ -3296,8 +3288,8 @@
                        drawRect.x < 0 || drawRect.x + drawRect.width > drawSize.width ||
                        drawRect.y < 0 || drawRect.y + drawRect.height > drawSize.height;
 
-    bool hasDepth = gl::GetDepthBits(drawRenderTarget11->getActualFormat(), getCurrentClientVersion()) > 0;
-    bool hasStencil = gl::GetStencilBits(drawRenderTarget11->getActualFormat(), getCurrentClientVersion()) > 0;
+    bool hasDepth = gl::GetDepthBits(drawRenderTarget11->getActualFormat()) > 0;
+    bool hasStencil = gl::GetStencilBits(drawRenderTarget11->getActualFormat()) > 0;
     bool partialDSBlit = (hasDepth && depthBlit) != (hasStencil && stencilBlit);
 
     if (readRenderTarget11->getActualFormat() == drawRenderTarget->getActualFormat() &&
@@ -3372,7 +3364,7 @@
         }
         else
         {
-            GLenum format = gl::GetFormat(drawRenderTarget->getInternalFormat(), getCurrentClientVersion());
+            GLenum format = gl::GetFormat(drawRenderTarget->getInternalFormat());
             result = mBlit->copyTexture(readSRV, readArea, readSize, drawRTV, drawArea, drawSize,
                                         scissor, format, filter);
         }
@@ -3485,8 +3477,7 @@
 
 GLenum Renderer11::getNativeTextureFormat(GLenum internalFormat) const
 {
-    int clientVersion = getCurrentClientVersion();
-    return d3d11_gl::GetInternalFormat(gl_d3d11::GetTexFormat(internalFormat, clientVersion), clientVersion);
+    return d3d11_gl::GetInternalFormat(gl_d3d11::GetTexFormat(internalFormat));
 }
 
 rx::VertexConversionType Renderer11::getVertexConversionType(const gl::VertexFormat &vertexFormat) const
diff --git a/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp b/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
index 3e8e832..ed0c4ae 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
@@ -132,7 +132,7 @@
 
         if (offscreenTextureDesc.Width != (UINT)backbufferWidth
             || offscreenTextureDesc.Height != (UINT)backbufferHeight
-            || offscreenTextureDesc.Format != gl_d3d11::GetTexFormat(mBackBufferFormat, mRenderer->getCurrentClientVersion())
+            || offscreenTextureDesc.Format != gl_d3d11::GetTexFormat(mBackBufferFormat)
             || offscreenTextureDesc.MipLevels != 1
             || offscreenTextureDesc.ArraySize != 1)
         {
@@ -148,7 +148,7 @@
         D3D11_TEXTURE2D_DESC offscreenTextureDesc = {0};
         offscreenTextureDesc.Width = backbufferWidth;
         offscreenTextureDesc.Height = backbufferHeight;
-        offscreenTextureDesc.Format = gl_d3d11::GetTexFormat(mBackBufferFormat, mRenderer->getCurrentClientVersion());
+        offscreenTextureDesc.Format = gl_d3d11::GetTexFormat(mBackBufferFormat);
         offscreenTextureDesc.MipLevels = 1;
         offscreenTextureDesc.ArraySize = 1;
         offscreenTextureDesc.SampleDesc.Count = 1;
@@ -204,7 +204,7 @@
 
 
     D3D11_RENDER_TARGET_VIEW_DESC offscreenRTVDesc;
-    offscreenRTVDesc.Format = gl_d3d11::GetRTVFormat(mBackBufferFormat, mRenderer->getCurrentClientVersion());
+    offscreenRTVDesc.Format = gl_d3d11::GetRTVFormat(mBackBufferFormat);
     offscreenRTVDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
     offscreenRTVDesc.Texture2D.MipSlice = 0;
 
@@ -213,7 +213,7 @@
     d3d11::SetDebugName(mOffscreenRTView, "Offscreen back buffer render target");
 
     D3D11_SHADER_RESOURCE_VIEW_DESC offscreenSRVDesc;
-    offscreenSRVDesc.Format = gl_d3d11::GetSRVFormat(mBackBufferFormat, mRenderer->getCurrentClientVersion());
+    offscreenSRVDesc.Format = gl_d3d11::GetSRVFormat(mBackBufferFormat);
     offscreenSRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
     offscreenSRVDesc.Texture2D.MostDetailedMip = 0;
     offscreenSRVDesc.Texture2D.MipLevels = -1;
@@ -227,7 +227,7 @@
         D3D11_TEXTURE2D_DESC depthStencilTextureDesc;
         depthStencilTextureDesc.Width = backbufferWidth;
         depthStencilTextureDesc.Height = backbufferHeight;
-        depthStencilTextureDesc.Format = gl_d3d11::GetTexFormat(mDepthBufferFormat, mRenderer->getCurrentClientVersion());
+        depthStencilTextureDesc.Format = gl_d3d11::GetTexFormat(mDepthBufferFormat);
         depthStencilTextureDesc.MipLevels = 1;
         depthStencilTextureDesc.ArraySize = 1;
         depthStencilTextureDesc.SampleDesc.Count = 1;
@@ -255,7 +255,7 @@
         d3d11::SetDebugName(mDepthStencilTexture, "Offscreen depth stencil texture");
 
         D3D11_DEPTH_STENCIL_VIEW_DESC depthStencilDesc;
-        depthStencilDesc.Format = gl_d3d11::GetDSVFormat(mDepthBufferFormat, mRenderer->getCurrentClientVersion());
+        depthStencilDesc.Format = gl_d3d11::GetDSVFormat(mDepthBufferFormat);
         depthStencilDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
         depthStencilDesc.Flags = 0;
         depthStencilDesc.Texture2D.MipSlice = 0;
@@ -265,7 +265,7 @@
         d3d11::SetDebugName(mDepthStencilDSView, "Offscreen depth stencil view");
 
         D3D11_SHADER_RESOURCE_VIEW_DESC depthStencilSRVDesc;
-        depthStencilSRVDesc.Format = gl_d3d11::GetSRVFormat(mDepthBufferFormat, mRenderer->getCurrentClientVersion());
+        depthStencilSRVDesc.Format = gl_d3d11::GetSRVFormat(mDepthBufferFormat);
         depthStencilSRVDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
         depthStencilSRVDesc.Texture2D.MostDetailedMip = 0;
         depthStencilSRVDesc.Texture2D.MipLevels = -1;
@@ -325,7 +325,7 @@
     SafeRelease(mBackBufferRTView);
 
     // Resize swap chain
-    DXGI_FORMAT backbufferDXGIFormat = gl_d3d11::GetTexFormat(mBackBufferFormat, mRenderer->getCurrentClientVersion());
+    DXGI_FORMAT backbufferDXGIFormat = gl_d3d11::GetTexFormat(mBackBufferFormat);
     HRESULT result = mSwapChain->ResizeBuffers(1, backbufferWidth, backbufferHeight, backbufferDXGIFormat, 0);
 
     if (FAILED(result))
@@ -398,7 +398,7 @@
         swapChainDesc.BufferDesc.Height = backbufferHeight;
         swapChainDesc.BufferDesc.RefreshRate.Numerator = 0;
         swapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
-        swapChainDesc.BufferDesc.Format = gl_d3d11::GetTexFormat(mBackBufferFormat, mRenderer->getCurrentClientVersion());
+        swapChainDesc.BufferDesc.Format = gl_d3d11::GetTexFormat(mBackBufferFormat);
         swapChainDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
         swapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
         swapChainDesc.SampleDesc.Count = 1;
diff --git a/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp b/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp
index 5d0da76..8f32468 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp
@@ -121,19 +121,19 @@
     return static_cast<TextureStorage11*>(storage);
 }
 
-DWORD TextureStorage11::GetTextureBindFlags(GLenum internalFormat, GLuint clientVersion, bool renderTarget)
+DWORD TextureStorage11::GetTextureBindFlags(GLenum internalFormat, bool renderTarget)
 {
     UINT bindFlags = 0;
 
-    if (gl_d3d11::GetSRVFormat(internalFormat, clientVersion) != DXGI_FORMAT_UNKNOWN)
+    if (gl_d3d11::GetSRVFormat(internalFormat) != DXGI_FORMAT_UNKNOWN)
     {
         bindFlags |= D3D11_BIND_SHADER_RESOURCE;
     }
-    if (gl_d3d11::GetDSVFormat(internalFormat, clientVersion) != DXGI_FORMAT_UNKNOWN)
+    if (gl_d3d11::GetDSVFormat(internalFormat) != DXGI_FORMAT_UNKNOWN)
     {
         bindFlags |= D3D11_BIND_DEPTH_STENCIL;
     }
-    if (gl_d3d11::GetRTVFormat(internalFormat, clientVersion) != DXGI_FORMAT_UNKNOWN && renderTarget)
+    if (gl_d3d11::GetRTVFormat(internalFormat) != DXGI_FORMAT_UNKNOWN && renderTarget)
     {
         bindFlags |= D3D11_BIND_RENDER_TARGET;
     }
@@ -355,8 +355,7 @@
             Blit11 *blitter = mRenderer->getBlitter();
 
             blitter->copyTexture(sourceSRV, sourceArea, sourceSize, destRTV, destArea, destSize, NULL,
-                                 gl::GetFormat(source->getInternalFormat(), mRenderer->getCurrentClientVersion()),
-                                 GL_LINEAR);
+                                 gl::GetFormat(source->getInternalFormat()), GL_LINEAR);
         }
     }
 }
@@ -401,18 +400,16 @@
     offscreenRTV->GetDesc(&rtvDesc);
     mRenderTargetFormat = rtvDesc.Format;
 
-    GLint internalFormat = d3d11_gl::GetInternalFormat(mTextureFormat, renderer->getCurrentClientVersion());
-    const gl::TextureCaps &formatCaps = renderer->getCaps().textureCaps.get(internalFormat);
-
-    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalFormat, formatCaps.colorRendering, renderer->getCurrentClientVersion());
-    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalFormat, formatCaps.colorRendering, renderer->getCurrentClientVersion());
-    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalFormat, formatCaps.colorRendering, renderer->getCurrentClientVersion());
+    GLenum internalFormat = d3d11_gl::GetInternalFormat(mTextureFormat);
+    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalFormat);
+    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalFormat);
+    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalFormat);
 
     mDepthStencilFormat = DXGI_FORMAT_UNKNOWN;
 }
 
 TextureStorage11_2D::TextureStorage11_2D(Renderer *renderer, GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, int levels)
-    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderer->getCurrentClientVersion(), renderTarget))
+    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderTarget))
 {
     mTexture = NULL;
     mSwizzleTexture = NULL;
@@ -423,17 +420,13 @@
         mSwizzleRenderTargets[i] = NULL;
     }
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
-    mTextureFormat = gl_d3d11::GetTexFormat(internalformat, clientVersion);
-    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat, clientVersion);
-    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat, clientVersion);
-    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat, clientVersion);
-
-    const gl::TextureCaps &formatCaps = renderer->getCaps().textureCaps.get(internalformat);
-    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat, formatCaps.colorRendering, clientVersion);
+    mTextureFormat = gl_d3d11::GetTexFormat(internalformat);
+    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat);
+    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat);
+    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat);
+    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat);
+    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat);
+    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat);
 
     // if the width or height is not positive this should be treated as an incomplete texture
     // we handle that here by skipping the d3d texture creation
@@ -683,7 +676,7 @@
 }
 
 TextureStorage11_Cube::TextureStorage11_Cube(Renderer *renderer, GLenum internalformat, bool renderTarget, int size, int levels)
-    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderer->getCurrentClientVersion(), renderTarget))
+    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderTarget))
 {
     mTexture = NULL;
     mSwizzleTexture = NULL;
@@ -697,17 +690,13 @@
         }
     }
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
-    mTextureFormat = gl_d3d11::GetTexFormat(internalformat, clientVersion);
-    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat, clientVersion);
-    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat, clientVersion);
-    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat, clientVersion);
-
-    const gl::TextureCaps &formatCaps = renderer->getCaps().textureCaps.get(internalformat);
-    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat, formatCaps.colorRendering, clientVersion);
+    mTextureFormat = gl_d3d11::GetTexFormat(internalformat);
+    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat);
+    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat);
+    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat);
+    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat);
+    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat);
+    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat);
 
     // if the size is not positive this should be treated as an incomplete texture
     // we handle that here by skipping the d3d texture creation
@@ -993,7 +982,7 @@
 
 TextureStorage11_3D::TextureStorage11_3D(Renderer *renderer, GLenum internalformat, bool renderTarget,
                                          GLsizei width, GLsizei height, GLsizei depth, int levels)
-    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderer->getCurrentClientVersion(), renderTarget))
+    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderTarget))
 {
     mTexture = NULL;
     mSwizzleTexture = NULL;
@@ -1004,17 +993,13 @@
         mSwizzleRenderTargets[i] = NULL;
     }
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
-    mTextureFormat = gl_d3d11::GetTexFormat(internalformat, clientVersion);
-    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat, clientVersion);
-    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat, clientVersion);
-    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat, clientVersion);
-
-    const gl::TextureCaps &formatCaps = renderer->getCaps().textureCaps.get(internalformat);
-    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat, formatCaps.colorRendering, clientVersion);
+    mTextureFormat = gl_d3d11::GetTexFormat(internalformat);
+    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat);
+    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat);
+    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat);
+    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat);
+    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat);
+    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat);
 
     // If the width, height or depth are not positive this should be treated as an incomplete texture
     // we handle that here by skipping the d3d texture creation
@@ -1301,7 +1286,7 @@
 
 TextureStorage11_2DArray::TextureStorage11_2DArray(Renderer *renderer, GLenum internalformat, bool renderTarget,
                                                    GLsizei width, GLsizei height, GLsizei depth, int levels)
-    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderer->getCurrentClientVersion(), renderTarget))
+    : TextureStorage11(renderer, GetTextureBindFlags(internalformat, renderTarget))
 {
     mTexture = NULL;
     mSwizzleTexture = NULL;
@@ -1311,17 +1296,13 @@
         mSwizzleRenderTargets[level] = NULL;
     }
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
-    mTextureFormat = gl_d3d11::GetTexFormat(internalformat, clientVersion);
-    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat, clientVersion);
-    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat, clientVersion);
-    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat, clientVersion);
-
-    const gl::TextureCaps &formatCaps = renderer->getCaps().textureCaps.get(internalformat);
-    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat, formatCaps.colorRendering, clientVersion);
-    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat, formatCaps.colorRendering, clientVersion);
+    mTextureFormat = gl_d3d11::GetTexFormat(internalformat);
+    mShaderResourceFormat = gl_d3d11::GetSRVFormat(internalformat);
+    mDepthStencilFormat = gl_d3d11::GetDSVFormat(internalformat);
+    mRenderTargetFormat = gl_d3d11::GetRTVFormat(internalformat);
+    mSwizzleTextureFormat = gl_d3d11::GetSwizzleTexFormat(internalformat);
+    mSwizzleShaderResourceFormat = gl_d3d11::GetSwizzleSRVFormat(internalformat);
+    mSwizzleRenderTargetFormat = gl_d3d11::GetSwizzleRTVFormat(internalformat);
 
     // if the width, height or depth is not positive this should be treated as an incomplete texture
     // we handle that here by skipping the d3d texture creation
diff --git a/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.h b/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.h
index 8a612bd..52977d2 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.h
+++ b/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.h
@@ -28,7 +28,7 @@
 
     static TextureStorage11 *makeTextureStorage11(TextureStorage *storage);
 
-    static DWORD GetTextureBindFlags(GLenum internalFormat, GLuint clientVersion, bool renderTarget);
+    static DWORD GetTextureBindFlags(GLenum internalFormat, bool renderTarget);
 
     UINT getBindFlags() const;
 
diff --git a/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp b/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp
index 783de7c..e40ab09 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp
@@ -18,18 +18,18 @@
 namespace rx
 {
 
-struct D3D11ES3FormatInfo
+struct D3D11FormatInfo
 {
     DXGI_FORMAT mTexFormat;
     DXGI_FORMAT mSRVFormat;
     DXGI_FORMAT mRTVFormat;
     DXGI_FORMAT mDSVFormat;
 
-    D3D11ES3FormatInfo()
+    D3D11FormatInfo()
         : mTexFormat(DXGI_FORMAT_UNKNOWN), mDSVFormat(DXGI_FORMAT_UNKNOWN), mRTVFormat(DXGI_FORMAT_UNKNOWN), mSRVFormat(DXGI_FORMAT_UNKNOWN)
     { }
 
-    D3D11ES3FormatInfo(DXGI_FORMAT texFormat, DXGI_FORMAT srvFormat, DXGI_FORMAT rtvFormat, DXGI_FORMAT dsvFormat)
+    D3D11FormatInfo(DXGI_FORMAT texFormat, DXGI_FORMAT srvFormat, DXGI_FORMAT rtvFormat, DXGI_FORMAT dsvFormat)
         : mTexFormat(texFormat), mDSVFormat(dsvFormat), mRTVFormat(rtvFormat), mSRVFormat(srvFormat)
     { }
 };
@@ -37,128 +37,129 @@
 // For sized GL internal formats, there is only one corresponding D3D11 format. This map type allows
 // querying for the DXGI texture formats to use for textures, SRVs, RTVs and DSVs given a GL internal
 // format.
-typedef std::pair<GLenum, D3D11ES3FormatInfo> D3D11ES3FormatPair;
-typedef std::map<GLenum, D3D11ES3FormatInfo> D3D11ES3FormatMap;
+typedef std::pair<GLenum, D3D11FormatInfo> D3D11ES3FormatPair;
+typedef std::map<GLenum, D3D11FormatInfo> D3D11ES3FormatMap;
 
-static D3D11ES3FormatMap BuildD3D11ES3FormatMap()
+static D3D11ES3FormatMap BuildD3D11FormatMap()
 {
     D3D11ES3FormatMap map;
 
-    //                           | GL internal format  |                  | D3D11 texture format            | D3D11 SRV format               | D3D11 RTV format               | D3D11 DSV format   |
-    map.insert(D3D11ES3FormatPair(GL_NONE,              D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,              DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R8,                D3D11ES3FormatInfo(DXGI_FORMAT_R8_UNORM,             DXGI_FORMAT_R8_UNORM,            DXGI_FORMAT_R8_UNORM,            DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R8_SNORM,          D3D11ES3FormatInfo(DXGI_FORMAT_R8_SNORM,             DXGI_FORMAT_R8_SNORM,            DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG8,               D3D11ES3FormatInfo(DXGI_FORMAT_R8G8_UNORM,           DXGI_FORMAT_R8G8_UNORM,          DXGI_FORMAT_R8G8_UNORM,          DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG8_SNORM,         D3D11ES3FormatInfo(DXGI_FORMAT_R8G8_SNORM,           DXGI_FORMAT_R8G8_SNORM,          DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB8,              D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB8_SNORM,        D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_SNORM,       DXGI_FORMAT_R8G8B8A8_SNORM,      DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB565,            D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA4,             D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB5_A1,           D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA8,             D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA8_SNORM,       D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_SNORM,       DXGI_FORMAT_R8G8B8A8_SNORM,      DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB10_A2,          D3D11ES3FormatInfo(DXGI_FORMAT_R10G10B10A2_UNORM,    DXGI_FORMAT_R10G10B10A2_UNORM,   DXGI_FORMAT_R10G10B10A2_UNORM,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB10_A2UI,        D3D11ES3FormatInfo(DXGI_FORMAT_R10G10B10A2_UINT,     DXGI_FORMAT_R10G10B10A2_UINT,    DXGI_FORMAT_R10G10B10A2_UINT,    DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_SRGB8,             D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,  DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_SRGB8_ALPHA8,      D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,  DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R16F,              D3D11ES3FormatInfo(DXGI_FORMAT_R16_FLOAT,            DXGI_FORMAT_R16_FLOAT,           DXGI_FORMAT_R16_FLOAT,           DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG16F,             D3D11ES3FormatInfo(DXGI_FORMAT_R16G16_FLOAT,         DXGI_FORMAT_R16G16_FLOAT,        DXGI_FORMAT_R16G16_FLOAT,        DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB16F,            D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT,   DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA16F,           D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT,   DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R32F,              D3D11ES3FormatInfo(DXGI_FORMAT_R32_FLOAT,            DXGI_FORMAT_R32_FLOAT,           DXGI_FORMAT_R32_FLOAT,           DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG32F,             D3D11ES3FormatInfo(DXGI_FORMAT_R32G32_FLOAT,         DXGI_FORMAT_R32G32_FLOAT,        DXGI_FORMAT_R32G32_FLOAT,        DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB32F,            D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT,   DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA32F,           D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT,   DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R11F_G11F_B10F,    D3D11ES3FormatInfo(DXGI_FORMAT_R11G11B10_FLOAT,      DXGI_FORMAT_R11G11B10_FLOAT,     DXGI_FORMAT_R11G11B10_FLOAT,     DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB9_E5,           D3D11ES3FormatInfo(DXGI_FORMAT_R9G9B9E5_SHAREDEXP,   DXGI_FORMAT_R9G9B9E5_SHAREDEXP,  DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R8I,               D3D11ES3FormatInfo(DXGI_FORMAT_R8_SINT,              DXGI_FORMAT_R8_SINT,             DXGI_FORMAT_R8_SINT,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R8UI,              D3D11ES3FormatInfo(DXGI_FORMAT_R8_UINT,              DXGI_FORMAT_R8_UINT,             DXGI_FORMAT_R8_UINT,             DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R16I,              D3D11ES3FormatInfo(DXGI_FORMAT_R16_SINT,             DXGI_FORMAT_R16_SINT,            DXGI_FORMAT_R16_SINT,            DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R16UI,             D3D11ES3FormatInfo(DXGI_FORMAT_R16_UINT,             DXGI_FORMAT_R16_UINT,            DXGI_FORMAT_R16_UINT,            DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R32I,              D3D11ES3FormatInfo(DXGI_FORMAT_R32_SINT,             DXGI_FORMAT_R32_SINT,            DXGI_FORMAT_R32_SINT,            DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_R32UI,             D3D11ES3FormatInfo(DXGI_FORMAT_R32_UINT,             DXGI_FORMAT_R32_UINT,            DXGI_FORMAT_R32_UINT,            DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG8I,              D3D11ES3FormatInfo(DXGI_FORMAT_R8G8_SINT,            DXGI_FORMAT_R8G8_SINT,           DXGI_FORMAT_R8G8_SINT,           DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG8UI,             D3D11ES3FormatInfo(DXGI_FORMAT_R8G8_UINT,            DXGI_FORMAT_R8G8_UINT,           DXGI_FORMAT_R8G8_UINT,           DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG16I,             D3D11ES3FormatInfo(DXGI_FORMAT_R16G16_SINT,          DXGI_FORMAT_R16G16_SINT,         DXGI_FORMAT_R16G16_SINT,         DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG16UI,            D3D11ES3FormatInfo(DXGI_FORMAT_R16G16_UINT,          DXGI_FORMAT_R16G16_UINT,         DXGI_FORMAT_R16G16_UINT,         DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG32I,             D3D11ES3FormatInfo(DXGI_FORMAT_R32G32_SINT,          DXGI_FORMAT_R32G32_SINT,         DXGI_FORMAT_R32G32_SINT,         DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RG32UI,            D3D11ES3FormatInfo(DXGI_FORMAT_R32G32_UINT,          DXGI_FORMAT_R32G32_UINT,         DXGI_FORMAT_R32G32_UINT,         DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB8I,             D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_SINT,        DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB8UI,            D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UINT,        DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB16I,            D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_SINT,    DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB16UI,           D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_UINT,    DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB32I,            D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_SINT,    DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB32UI,           D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_UINT,    DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA8I,            D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_SINT,        DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA8UI,           D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UINT,        DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA16I,           D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_SINT,    DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA16UI,          D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_UINT,    DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA32I,           D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_SINT,    DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA32UI,          D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_UINT,    DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_UNKNOWN)));
+    //                           | GL internal format  |               | D3D11 texture format            | D3D11 SRV format               | D3D11 RTV format               | D3D11 DSV format   |
+    map.insert(D3D11ES3FormatPair(GL_NONE,              D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,              DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R8,                D3D11FormatInfo(DXGI_FORMAT_R8_UNORM,             DXGI_FORMAT_R8_UNORM,            DXGI_FORMAT_R8_UNORM,            DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R8_SNORM,          D3D11FormatInfo(DXGI_FORMAT_R8_SNORM,             DXGI_FORMAT_R8_SNORM,            DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG8,               D3D11FormatInfo(DXGI_FORMAT_R8G8_UNORM,           DXGI_FORMAT_R8G8_UNORM,          DXGI_FORMAT_R8G8_UNORM,          DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG8_SNORM,         D3D11FormatInfo(DXGI_FORMAT_R8G8_SNORM,           DXGI_FORMAT_R8G8_SNORM,          DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB8,              D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB8_SNORM,        D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_SNORM,       DXGI_FORMAT_R8G8B8A8_SNORM,      DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB565,            D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA4,             D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB5_A1,           D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA8,             D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA8_SNORM,       D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_SNORM,       DXGI_FORMAT_R8G8B8A8_SNORM,      DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB10_A2,          D3D11FormatInfo(DXGI_FORMAT_R10G10B10A2_UNORM,    DXGI_FORMAT_R10G10B10A2_UNORM,   DXGI_FORMAT_R10G10B10A2_UNORM,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB10_A2UI,        D3D11FormatInfo(DXGI_FORMAT_R10G10B10A2_UINT,     DXGI_FORMAT_R10G10B10A2_UINT,    DXGI_FORMAT_R10G10B10A2_UINT,    DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_SRGB8,             D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,  DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_SRGB8_ALPHA8,      D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,  DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R16F,              D3D11FormatInfo(DXGI_FORMAT_R16_FLOAT,            DXGI_FORMAT_R16_FLOAT,           DXGI_FORMAT_R16_FLOAT,           DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG16F,             D3D11FormatInfo(DXGI_FORMAT_R16G16_FLOAT,         DXGI_FORMAT_R16G16_FLOAT,        DXGI_FORMAT_R16G16_FLOAT,        DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB16F,            D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT,   DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA16F,           D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT,   DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_R16G16B16A16_FLOAT,  DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R32F,              D3D11FormatInfo(DXGI_FORMAT_R32_FLOAT,            DXGI_FORMAT_R32_FLOAT,           DXGI_FORMAT_R32_FLOAT,           DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG32F,             D3D11FormatInfo(DXGI_FORMAT_R32G32_FLOAT,         DXGI_FORMAT_R32G32_FLOAT,        DXGI_FORMAT_R32G32_FLOAT,        DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB32F,            D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT,   DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA32F,           D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT,   DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_R32G32B32A32_FLOAT,  DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R11F_G11F_B10F,    D3D11FormatInfo(DXGI_FORMAT_R11G11B10_FLOAT,      DXGI_FORMAT_R11G11B10_FLOAT,     DXGI_FORMAT_R11G11B10_FLOAT,     DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB9_E5,           D3D11FormatInfo(DXGI_FORMAT_R9G9B9E5_SHAREDEXP,   DXGI_FORMAT_R9G9B9E5_SHAREDEXP,  DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R8I,               D3D11FormatInfo(DXGI_FORMAT_R8_SINT,              DXGI_FORMAT_R8_SINT,             DXGI_FORMAT_R8_SINT,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R8UI,              D3D11FormatInfo(DXGI_FORMAT_R8_UINT,              DXGI_FORMAT_R8_UINT,             DXGI_FORMAT_R8_UINT,             DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R16I,              D3D11FormatInfo(DXGI_FORMAT_R16_SINT,             DXGI_FORMAT_R16_SINT,            DXGI_FORMAT_R16_SINT,            DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R16UI,             D3D11FormatInfo(DXGI_FORMAT_R16_UINT,             DXGI_FORMAT_R16_UINT,            DXGI_FORMAT_R16_UINT,            DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R32I,              D3D11FormatInfo(DXGI_FORMAT_R32_SINT,             DXGI_FORMAT_R32_SINT,            DXGI_FORMAT_R32_SINT,            DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_R32UI,             D3D11FormatInfo(DXGI_FORMAT_R32_UINT,             DXGI_FORMAT_R32_UINT,            DXGI_FORMAT_R32_UINT,            DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG8I,              D3D11FormatInfo(DXGI_FORMAT_R8G8_SINT,            DXGI_FORMAT_R8G8_SINT,           DXGI_FORMAT_R8G8_SINT,           DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG8UI,             D3D11FormatInfo(DXGI_FORMAT_R8G8_UINT,            DXGI_FORMAT_R8G8_UINT,           DXGI_FORMAT_R8G8_UINT,           DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG16I,             D3D11FormatInfo(DXGI_FORMAT_R16G16_SINT,          DXGI_FORMAT_R16G16_SINT,         DXGI_FORMAT_R16G16_SINT,         DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG16UI,            D3D11FormatInfo(DXGI_FORMAT_R16G16_UINT,          DXGI_FORMAT_R16G16_UINT,         DXGI_FORMAT_R16G16_UINT,         DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG32I,             D3D11FormatInfo(DXGI_FORMAT_R32G32_SINT,          DXGI_FORMAT_R32G32_SINT,         DXGI_FORMAT_R32G32_SINT,         DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RG32UI,            D3D11FormatInfo(DXGI_FORMAT_R32G32_UINT,          DXGI_FORMAT_R32G32_UINT,         DXGI_FORMAT_R32G32_UINT,         DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB8I,             D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_SINT,        DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB8UI,            D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UINT,        DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB16I,            D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_SINT,    DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB16UI,           D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_UINT,    DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB32I,            D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_SINT,    DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB32UI,           D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_UINT,    DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA8I,            D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_SINT,        DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_R8G8B8A8_SINT,       DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA8UI,           D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UINT,        DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_R8G8B8A8_UINT,       DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA16I,           D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_SINT,    DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_R16G16B16A16_SINT,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA16UI,          D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_UINT,    DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_R16G16B16A16_UINT,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA32I,           D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_SINT,    DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_R32G32B32A32_SINT,   DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA32UI,          D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_UINT,    DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_R32G32B32A32_UINT,   DXGI_FORMAT_UNKNOWN)));
 
     // Unsized formats, TODO: Are types of float and half float allowed for the unsized types? Would it change the DXGI format?
-    map.insert(D3D11ES3FormatPair(GL_ALPHA,             D3D11ES3FormatInfo(DXGI_FORMAT_A8_UNORM,             DXGI_FORMAT_A8_UNORM,            DXGI_FORMAT_A8_UNORM,            DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE,         D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE_ALPHA,   D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGB,               D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_RGBA,              D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_BGRA_EXT,          D3D11ES3FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,       DXGI_FORMAT_B8G8R8A8_UNORM,      DXGI_FORMAT_B8G8R8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_ALPHA,             D3D11FormatInfo(DXGI_FORMAT_A8_UNORM,             DXGI_FORMAT_A8_UNORM,            DXGI_FORMAT_A8_UNORM,            DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE,         D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE_ALPHA,   D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGB,               D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_RGBA,              D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,       DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_R8G8B8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_BGRA_EXT,          D3D11FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,       DXGI_FORMAT_B8G8R8A8_UNORM,      DXGI_FORMAT_B8G8R8A8_UNORM,      DXGI_FORMAT_UNKNOWN)));
 
     // From GL_EXT_texture_storage
-    //                           | GL internal format       |                  | D3D11 texture format          | D3D11 SRV format                    | D3D11 RTV format              | D3D11 DSV format               |
-    map.insert(D3D11ES3FormatPair(GL_ALPHA8_EXT,             D3D11ES3FormatInfo(DXGI_FORMAT_A8_UNORM,           DXGI_FORMAT_A8_UNORM,                 DXGI_FORMAT_A8_UNORM,           DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE8_EXT,         D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,           DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_ALPHA32F_EXT,           D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,       DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE32F_EXT,       D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,       DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_ALPHA16F_EXT,           D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,       DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE16F_EXT,       D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,       DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE8_ALPHA8_EXT,  D3D11ES3FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,           DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE_ALPHA32F_EXT, D3D11ES3FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,       DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_LUMINANCE_ALPHA16F_EXT, D3D11ES3FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,       DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_BGRA8_EXT,              D3D11ES3FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,           DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_BGRA4_ANGLEX,           D3D11ES3FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,           DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
-    map.insert(D3D11ES3FormatPair(GL_BGR5_A1_ANGLEX,         D3D11ES3FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,           DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
+    //                           | GL internal format       |               | D3D11 texture format          | D3D11 SRV format                    | D3D11 RTV format              | D3D11 DSV format               |
+    map.insert(D3D11ES3FormatPair(GL_ALPHA8_EXT,             D3D11FormatInfo(DXGI_FORMAT_A8_UNORM,           DXGI_FORMAT_A8_UNORM,                 DXGI_FORMAT_A8_UNORM,           DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE8_EXT,         D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,           DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_ALPHA32F_EXT,           D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,       DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE32F_EXT,       D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,       DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_ALPHA16F_EXT,           D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,       DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE16F_EXT,       D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,       DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE8_ALPHA8_EXT,  D3D11FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,           DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE_ALPHA32F_EXT, D3D11FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,       DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_LUMINANCE_ALPHA16F_EXT, D3D11FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,       DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_BGRA8_EXT,              D3D11FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,           DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_BGRA4_ANGLEX,           D3D11FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,           DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
+    map.insert(D3D11ES3FormatPair(GL_BGR5_A1_ANGLEX,         D3D11FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,           DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN             )));
 
     // Depth stencil formats
-    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT16,     D3D11ES3FormatInfo(DXGI_FORMAT_R16_TYPELESS,        DXGI_FORMAT_R16_UNORM,                DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D16_UNORM           )));
-    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT24,     D3D11ES3FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_R24_UNORM_X8_TYPELESS,    DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT   )));
-    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT32F,    D3D11ES3FormatInfo(DXGI_FORMAT_R32_TYPELESS,        DXGI_FORMAT_R32_FLOAT,                DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D32_FLOAT           )));
-    map.insert(D3D11ES3FormatPair(GL_DEPTH24_STENCIL8,      D3D11ES3FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_R24_UNORM_X8_TYPELESS,    DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT   )));
-    map.insert(D3D11ES3FormatPair(GL_DEPTH32F_STENCIL8,     D3D11ES3FormatInfo(DXGI_FORMAT_R32G8X24_TYPELESS,   DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D32_FLOAT_S8X24_UINT)));
-    map.insert(D3D11ES3FormatPair(GL_STENCIL_INDEX8,        D3D11ES3FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_X24_TYPELESS_G8_UINT,     DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT   )));
+    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT16,     D3D11FormatInfo(DXGI_FORMAT_R16_TYPELESS,        DXGI_FORMAT_R16_UNORM,                DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D16_UNORM           )));
+    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT24,     D3D11FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_R24_UNORM_X8_TYPELESS,    DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT   )));
+    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT32F,    D3D11FormatInfo(DXGI_FORMAT_R32_TYPELESS,        DXGI_FORMAT_R32_FLOAT,                DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D32_FLOAT           )));
+    map.insert(D3D11ES3FormatPair(GL_DEPTH24_STENCIL8,      D3D11FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_R24_UNORM_X8_TYPELESS,    DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT   )));
+    map.insert(D3D11ES3FormatPair(GL_DEPTH32F_STENCIL8,     D3D11FormatInfo(DXGI_FORMAT_R32G8X24_TYPELESS,   DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D32_FLOAT_S8X24_UINT)));
+    map.insert(D3D11ES3FormatPair(GL_STENCIL_INDEX8,        D3D11FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_X24_TYPELESS_G8_UINT,     DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT   )));
 
     // From GL_ANGLE_depth_texture
-    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT32_OES, D3D11ES3FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_R24_UNORM_X8_TYPELESS,    DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_D24_UNORM_S8_UINT  )));
+    // Since D3D11 doesn't have a D32_UNORM format, use D24S8 which has comparable precision and matches the ES3 format.
+    map.insert(D3D11ES3FormatPair(GL_DEPTH_COMPONENT32_OES, D3D11FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,      DXGI_FORMAT_R24_UNORM_X8_TYPELESS,    DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_D24_UNORM_S8_UINT  )));
 
     // Compressed formats, From ES 3.0.1 spec, table 3.16
-    //                           | GL internal format                          |                  | D3D11 texture format | D3D11 SRV format     | D3D11 RTV format   | D3D11 DSV format  |
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_R11_EAC,                        D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SIGNED_R11_EAC,                 D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RG11_EAC,                       D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SIGNED_RG11_EAC,                D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGB8_ETC2,                      D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SRGB8_ETC2,                     D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,  D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA8_ETC2_EAC,                 D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,          D3D11ES3FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    //                           | GL internal format                          |               | D3D11 texture format | D3D11 SRV format     | D3D11 RTV format   | D3D11 DSV format  |
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_R11_EAC,                        D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SIGNED_R11_EAC,                 D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RG11_EAC,                       D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SIGNED_RG11_EAC,                D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGB8_ETC2,                      D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SRGB8_ETC2,                     D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,  D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA8_ETC2_EAC,                 D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,          D3D11FormatInfo(DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN,   DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
 
     // From GL_EXT_texture_compression_dxt1
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGB_S3TC_DXT1_EXT,              D3D11ES3FormatInfo(DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,             D3D11ES3FormatInfo(DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGB_S3TC_DXT1_EXT,              D3D11FormatInfo(DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,             D3D11FormatInfo(DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
 
     // From GL_ANGLE_texture_compression_dxt3
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE,           D3D11ES3FormatInfo(DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE,           D3D11FormatInfo(DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
 
     // From GL_ANGLE_texture_compression_dxt5
-    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE,           D3D11ES3FormatInfo(DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
+    map.insert(D3D11ES3FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE,           D3D11FormatInfo(DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN)));
 
     return map;
 }
 
-static bool GetD3D11ES3FormatInfo(GLenum internalFormat, GLuint clientVersion, D3D11ES3FormatInfo *outFormatInfo)
+static bool GetD3D11FormatInfo(GLenum internalFormat, D3D11FormatInfo *outFormatInfo)
 {
-    static const D3D11ES3FormatMap formatMap = BuildD3D11ES3FormatMap();
+    static const D3D11ES3FormatMap formatMap = BuildD3D11FormatMap();
     D3D11ES3FormatMap::const_iterator iter = formatMap.find(internalFormat);
     if (iter != formatMap.end())
     {
@@ -218,6 +219,7 @@
     insertLoadFunction(&map, GL_RGB5_A1,            GL_UNSIGNED_SHORT_5_5_5_1,         loadRGBA5551DataToRGBA               );
     insertLoadFunction(&map, GL_RGB5_A1,            GL_UNSIGNED_INT_2_10_10_10_REV,    loadRGBA2101010ToRGBA                );
     insertLoadFunction(&map, GL_RGBA16F,            GL_HALF_FLOAT,                     loadToNative<GLhalf, 4>              );
+    insertLoadFunction(&map, GL_RGBA16F,            GL_HALF_FLOAT_OES,                 loadToNative<GLhalf, 4>              );
     insertLoadFunction(&map, GL_RGBA32F,            GL_FLOAT,                          loadToNative<GLfloat, 4>             );
     insertLoadFunction(&map, GL_RGBA16F,            GL_FLOAT,                          loadFloatDataToHalfFloat<4>          );
     insertLoadFunction(&map, GL_RGBA8UI,            GL_UNSIGNED_BYTE,                  loadToNative<GLubyte, 4>             );
@@ -235,8 +237,11 @@
     insertLoadFunction(&map, GL_R11F_G11F_B10F,     GL_UNSIGNED_INT_10F_11F_11F_REV,   loadToNative<GLuint, 1>              );
     insertLoadFunction(&map, GL_RGB9_E5,            GL_UNSIGNED_INT_5_9_9_9_REV,       loadToNative<GLuint, 1>              );
     insertLoadFunction(&map, GL_RGB16F,             GL_HALF_FLOAT,                     loadToNative3To4<GLhalf, gl::Float16One>);
+    insertLoadFunction(&map, GL_RGB16F,             GL_HALF_FLOAT_OES,                 loadToNative3To4<GLhalf, gl::Float16One>);
     insertLoadFunction(&map, GL_R11F_G11F_B10F,     GL_HALF_FLOAT,                     loadRGBHalfFloatDataTo111110Float    );
+    insertLoadFunction(&map, GL_R11F_G11F_B10F,     GL_HALF_FLOAT_OES,                 loadRGBHalfFloatDataTo111110Float    );
     insertLoadFunction(&map, GL_RGB9_E5,            GL_HALF_FLOAT,                     loadRGBHalfFloatDataTo999E5          );
+    insertLoadFunction(&map, GL_RGB9_E5,            GL_HALF_FLOAT_OES,                 loadRGBHalfFloatDataTo999E5          );
     insertLoadFunction(&map, GL_RGB32F,             GL_FLOAT,                          loadToNative3To4<GLfloat, gl::Float32One>);
     insertLoadFunction(&map, GL_RGB16F,             GL_FLOAT,                          loadFloatRGBDataToHalfFloatRGBA      );
     insertLoadFunction(&map, GL_R11F_G11F_B10F,     GL_FLOAT,                          loadRGBFloatDataTo111110Float        );
@@ -250,6 +255,7 @@
     insertLoadFunction(&map, GL_RG8,                GL_UNSIGNED_BYTE,                  loadToNative<GLubyte, 2>             );
     insertLoadFunction(&map, GL_RG8_SNORM,          GL_BYTE,                           loadToNative<GLbyte, 2>              );
     insertLoadFunction(&map, GL_RG16F,              GL_HALF_FLOAT,                     loadToNative<GLhalf, 2>              );
+    insertLoadFunction(&map, GL_RG16F,              GL_HALF_FLOAT_OES,                 loadToNative<GLhalf, 2>              );
     insertLoadFunction(&map, GL_RG32F,              GL_FLOAT,                          loadToNative<GLfloat, 2>             );
     insertLoadFunction(&map, GL_RG16F,              GL_FLOAT,                          loadFloatDataToHalfFloat<2>          );
     insertLoadFunction(&map, GL_RG8UI,              GL_UNSIGNED_BYTE,                  loadToNative<GLubyte, 2>             );
@@ -261,6 +267,7 @@
     insertLoadFunction(&map, GL_R8,                 GL_UNSIGNED_BYTE,                  loadToNative<GLubyte, 1>             );
     insertLoadFunction(&map, GL_R8_SNORM,           GL_BYTE,                           loadToNative<GLbyte, 1>              );
     insertLoadFunction(&map, GL_R16F,               GL_HALF_FLOAT,                     loadToNative<GLhalf, 1>              );
+    insertLoadFunction(&map, GL_R16F,               GL_HALF_FLOAT_OES,                 loadToNative<GLhalf, 1>              );
     insertLoadFunction(&map, GL_R32F,               GL_FLOAT,                          loadToNative<GLfloat, 1>             );
     insertLoadFunction(&map, GL_R16F,               GL_FLOAT,                          loadFloatDataToHalfFloat<1>          );
     insertLoadFunction(&map, GL_R8UI,               GL_UNSIGNED_BYTE,                  loadToNative<GLubyte, 1>             );
@@ -290,25 +297,35 @@
 
     // From GL_OES_texture_float
     insertLoadFunction(&map, GL_LUMINANCE_ALPHA,    GL_FLOAT,                          loadLuminanceAlphaFloatDataToRGBA    );
-    insertLoadFunction(&map, GL_LUMINANCE,          GL_FLOAT,                          loadLuminanceFloatDataToRGB          );
+    insertLoadFunction(&map, GL_LUMINANCE,          GL_FLOAT,                          loadLuminanceFloatDataToRGBA         );
     insertLoadFunction(&map, GL_ALPHA,              GL_FLOAT,                          loadAlphaFloatDataToRGBA             );
 
     // From GL_OES_texture_half_float
     insertLoadFunction(&map, GL_LUMINANCE_ALPHA,    GL_HALF_FLOAT,                     loadLuminanceAlphaHalfFloatDataToRGBA);
+    insertLoadFunction(&map, GL_LUMINANCE_ALPHA,    GL_HALF_FLOAT_OES,                 loadLuminanceAlphaHalfFloatDataToRGBA);
     insertLoadFunction(&map, GL_LUMINANCE,          GL_HALF_FLOAT,                     loadLuminanceHalfFloatDataToRGBA     );
+    insertLoadFunction(&map, GL_LUMINANCE,          GL_HALF_FLOAT_OES,                 loadLuminanceHalfFloatDataToRGBA     );
     insertLoadFunction(&map, GL_ALPHA,              GL_HALF_FLOAT,                     loadAlphaHalfFloatDataToRGBA         );
+    insertLoadFunction(&map, GL_ALPHA,              GL_HALF_FLOAT_OES,                 loadAlphaHalfFloatDataToRGBA         );
 
     // From GL_EXT_texture_storage
     insertLoadFunction(&map, GL_ALPHA8_EXT,             GL_UNSIGNED_BYTE,              loadToNative<GLubyte, 1>             );
     insertLoadFunction(&map, GL_LUMINANCE8_EXT,         GL_UNSIGNED_BYTE,              loadLuminanceDataToBGRA              );
     insertLoadFunction(&map, GL_LUMINANCE8_ALPHA8_EXT,  GL_UNSIGNED_BYTE,              loadLuminanceAlphaDataToBGRA         );
     insertLoadFunction(&map, GL_ALPHA32F_EXT,           GL_FLOAT,                      loadAlphaFloatDataToRGBA             );
-    insertLoadFunction(&map, GL_LUMINANCE32F_EXT,       GL_FLOAT,                      loadLuminanceFloatDataToRGB          );
+    insertLoadFunction(&map, GL_LUMINANCE32F_EXT,       GL_FLOAT,                      loadLuminanceFloatDataToRGBA         );
     insertLoadFunction(&map, GL_LUMINANCE_ALPHA32F_EXT, GL_FLOAT,                      loadLuminanceAlphaFloatDataToRGBA    );
     insertLoadFunction(&map, GL_ALPHA16F_EXT,           GL_HALF_FLOAT,                 loadAlphaHalfFloatDataToRGBA         );
+    insertLoadFunction(&map, GL_ALPHA16F_EXT,           GL_HALF_FLOAT_OES,             loadAlphaHalfFloatDataToRGBA         );
     insertLoadFunction(&map, GL_LUMINANCE16F_EXT,       GL_HALF_FLOAT,                 loadLuminanceHalfFloatDataToRGBA     );
+    insertLoadFunction(&map, GL_LUMINANCE16F_EXT,       GL_HALF_FLOAT_OES,             loadLuminanceHalfFloatDataToRGBA     );
     insertLoadFunction(&map, GL_LUMINANCE_ALPHA16F_EXT, GL_HALF_FLOAT,                 loadLuminanceAlphaHalfFloatDataToRGBA);
+    insertLoadFunction(&map, GL_LUMINANCE_ALPHA16F_EXT, GL_HALF_FLOAT_OES,             loadLuminanceAlphaHalfFloatDataToRGBA);
 
+    // From GL_ANGLE_depth_texture
+    insertLoadFunction(&map, GL_DEPTH_COMPONENT32_OES,  GL_UNSIGNED_INT,               loadUintDataToUint24X8               );
+
+    // From GL_EXT_texture_format_BGRA8888
     insertLoadFunction(&map, GL_BGRA8_EXT,              GL_UNSIGNED_BYTE,                  loadToNative<GLubyte, 4>         );
     insertLoadFunction(&map, GL_BGRA4_ANGLEX,           GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, loadRGBA4444DataToRGBA           );
     insertLoadFunction(&map, GL_BGRA4_ANGLEX,           GL_UNSIGNED_BYTE,                  loadToNative<GLubyte, 4>         );
@@ -343,107 +360,6 @@
     return map;
 }
 
-struct D3D11ES2FormatInfo
-{
-    DXGI_FORMAT mTexFormat;
-    DXGI_FORMAT mSRVFormat;
-    DXGI_FORMAT mRTVFormat;
-    DXGI_FORMAT mDSVFormat;
-
-    LoadImageFunction mLoadImageFunction;
-
-    D3D11ES2FormatInfo()
-        : mTexFormat(DXGI_FORMAT_UNKNOWN), mDSVFormat(DXGI_FORMAT_UNKNOWN), mRTVFormat(DXGI_FORMAT_UNKNOWN),
-        mSRVFormat(DXGI_FORMAT_UNKNOWN), mLoadImageFunction(NULL)
-    { }
-
-    D3D11ES2FormatInfo(DXGI_FORMAT texFormat, DXGI_FORMAT srvFormat, DXGI_FORMAT rtvFormat, DXGI_FORMAT dsvFormat,
-        LoadImageFunction loadFunc)
-        : mTexFormat(texFormat), mDSVFormat(dsvFormat), mRTVFormat(rtvFormat), mSRVFormat(srvFormat),
-        mLoadImageFunction(loadFunc)
-    { }
-};
-
-// ES2 internal formats can map to DXGI formats and loading functions
-typedef std::pair<GLenum, D3D11ES2FormatInfo> D3D11ES2FormatPair;
-typedef std::map<GLenum, D3D11ES2FormatInfo> D3D11ES2FormatMap;
-
-static D3D11ES2FormatMap BuildD3D11ES2FormatMap()
-{
-    D3D11ES2FormatMap map;
-
-    //                           | Internal format                   |                  | Texture format                | SRV format                       | RTV format                    | DSV format                   | Load function                           |
-    map.insert(D3D11ES2FormatPair(GL_NONE,                            D3D11ES2FormatInfo(DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,               DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,           UnreachableLoadFunction                  )));
-    map.insert(D3D11ES2FormatPair(GL_DEPTH_COMPONENT16,               D3D11ES2FormatInfo(DXGI_FORMAT_R16_TYPELESS,       DXGI_FORMAT_R16_UNORM,             DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D16_UNORM,         UnreachableLoadFunction                  )));
-    map.insert(D3D11ES2FormatPair(GL_DEPTH24_STENCIL8_OES,            D3D11ES2FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,     DXGI_FORMAT_R24_UNORM_X8_TYPELESS, DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT, UnreachableLoadFunction                  )));
-    map.insert(D3D11ES2FormatPair(GL_STENCIL_INDEX8,                  D3D11ES2FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,     DXGI_FORMAT_X24_TYPELESS_G8_UINT,  DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT, UnreachableLoadFunction                  )));
-
-    // Since D3D11 doesn't have a D32_UNORM format, use D24S8 which has comparable precision and matches the ES3 format.
-    map.insert(D3D11ES2FormatPair(GL_DEPTH_COMPONENT32_OES,           D3D11ES2FormatInfo(DXGI_FORMAT_R24G8_TYPELESS,     DXGI_FORMAT_R24_UNORM_X8_TYPELESS, DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_D24_UNORM_S8_UINT, UnreachableLoadFunction                  )));
-
-    map.insert(D3D11ES2FormatPair(GL_RGBA32F_EXT,                     D3D11ES2FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,    DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN,           loadRGBAFloatDataToRGBA                  )));
-    map.insert(D3D11ES2FormatPair(GL_RGB32F_EXT,                      D3D11ES2FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,    DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN,           loadRGBFloatDataToRGBA                   )));
-    map.insert(D3D11ES2FormatPair(GL_ALPHA32F_EXT,                    D3D11ES2FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,    DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN,           loadAlphaFloatDataToRGBA                 )));
-    map.insert(D3D11ES2FormatPair(GL_LUMINANCE32F_EXT,                D3D11ES2FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,    DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN,           loadLuminanceFloatDataToRGBA             )));
-    map.insert(D3D11ES2FormatPair(GL_LUMINANCE_ALPHA32F_EXT,          D3D11ES2FormatInfo(DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT,    DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN,           loadLuminanceAlphaFloatDataToRGBA        )));
-
-    map.insert(D3D11ES2FormatPair(GL_RGBA16F_EXT,                     D3D11ES2FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,    DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN,           loadRGBAHalfFloatDataToRGBA              )));
-    map.insert(D3D11ES2FormatPair(GL_RGB16F_EXT,                      D3D11ES2FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,    DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN,           loadRGBHalfFloatDataToRGBA               )));
-    map.insert(D3D11ES2FormatPair(GL_ALPHA16F_EXT,                    D3D11ES2FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,    DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN,           loadAlphaHalfFloatDataToRGBA             )));
-    map.insert(D3D11ES2FormatPair(GL_LUMINANCE16F_EXT,                D3D11ES2FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,    DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN,           loadLuminanceHalfFloatDataToRGBA         )));
-    map.insert(D3D11ES2FormatPair(GL_LUMINANCE_ALPHA16F_EXT,          D3D11ES2FormatInfo(DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT,    DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_UNKNOWN,           loadLuminanceAlphaHalfFloatDataToRGBA    )));
-
-    map.insert(D3D11ES2FormatPair(GL_ALPHA8_EXT,                      D3D11ES2FormatInfo(DXGI_FORMAT_A8_UNORM,           DXGI_FORMAT_A8_UNORM,              DXGI_FORMAT_A8_UNORM,           DXGI_FORMAT_UNKNOWN,           loadAlphaDataToNative                    )));
-    map.insert(D3D11ES2FormatPair(GL_LUMINANCE8_EXT,                  D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,        DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadLuminanceDataToBGRA                  )));
-    map.insert(D3D11ES2FormatPair(GL_LUMINANCE8_ALPHA8_EXT,           D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,        DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadLuminanceAlphaDataToBGRA             )));
-
-    map.insert(D3D11ES2FormatPair(GL_RGB8_OES,                        D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,        DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadRGBUByteDataToRGBA                   )));
-    map.insert(D3D11ES2FormatPair(GL_RGB565,                          D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,        DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadRGB565DataToRGBA                     )));
-    map.insert(D3D11ES2FormatPair(GL_RGBA8_OES,                       D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,        DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadRGBAUByteDataToNative                )));
-    map.insert(D3D11ES2FormatPair(GL_RGBA4,                           D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,        DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadRGBA4444DataToRGBA                   )));
-    map.insert(D3D11ES2FormatPair(GL_RGB5_A1,                         D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_R8G8B8A8_UNORM,        DXGI_FORMAT_R8G8B8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadRGBA5551DataToRGBA                   )));
-    map.insert(D3D11ES2FormatPair(GL_BGRA8_EXT,                       D3D11ES2FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,        DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadBGRADataToBGRA                       )));
-    map.insert(D3D11ES2FormatPair(GL_BGRA4_ANGLEX,                    D3D11ES2FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,        DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadRGBA4444DataToRGBA                   )));
-    map.insert(D3D11ES2FormatPair(GL_BGR5_A1_ANGLEX,                  D3D11ES2FormatInfo(DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_B8G8R8A8_UNORM,        DXGI_FORMAT_B8G8R8A8_UNORM,     DXGI_FORMAT_UNKNOWN,           loadRGBA5551DataToRGBA                   )));
-
-    // From GL_EXT_sRGB
-    map.insert(D3D11ES2FormatPair(GL_SRGB8,                           D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_UNKNOWN,             DXGI_FORMAT_UNKNOWN,           loadToNative3To4<GLubyte, 0xFF>          )));
-    map.insert(D3D11ES2FormatPair(GL_SRGB8_ALPHA8,                    D3D11ES2FormatInfo(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_UNKNOWN,           loadToNative<GLubyte, 4>                 )));
-
-    // From GL_EXT_texture_rg
-    map.insert(D3D11ES2FormatPair(GL_R8_EXT,                          D3D11ES2FormatInfo(DXGI_FORMAT_R8_UNORM,           DXGI_FORMAT_R8_UNORM,              DXGI_FORMAT_R8_UNORM,           DXGI_FORMAT_UNKNOWN,           loadToNative<GLubyte, 1>                 )));
-    map.insert(D3D11ES2FormatPair(GL_R32F_EXT,                        D3D11ES2FormatInfo(DXGI_FORMAT_R32_FLOAT,          DXGI_FORMAT_R32_FLOAT,             DXGI_FORMAT_R32_FLOAT,          DXGI_FORMAT_UNKNOWN,           loadToNative<GLfloat, 1>                 )));
-    map.insert(D3D11ES2FormatPair(GL_R16F_EXT,                        D3D11ES2FormatInfo(DXGI_FORMAT_R16_FLOAT,          DXGI_FORMAT_R16_FLOAT,             DXGI_FORMAT_R16_FLOAT,          DXGI_FORMAT_UNKNOWN,           loadToNative<GLhalf, 1>                  )));
-    map.insert(D3D11ES2FormatPair(GL_RG8_EXT,                         D3D11ES2FormatInfo(DXGI_FORMAT_R8G8_UNORM,         DXGI_FORMAT_R8G8_UNORM,            DXGI_FORMAT_R8G8_UNORM,         DXGI_FORMAT_UNKNOWN,           loadToNative<GLubyte, 2>                 )));
-    map.insert(D3D11ES2FormatPair(GL_RG32F_EXT,                       D3D11ES2FormatInfo(DXGI_FORMAT_R32G32_FLOAT,       DXGI_FORMAT_R32G32_FLOAT,          DXGI_FORMAT_R32G32_FLOAT,       DXGI_FORMAT_UNKNOWN,           loadToNative<GLfloat, 2>                 )));
-    map.insert(D3D11ES2FormatPair(GL_RG16F_EXT,                       D3D11ES2FormatInfo(DXGI_FORMAT_R16G16_FLOAT,       DXGI_FORMAT_R16G16_FLOAT,          DXGI_FORMAT_R16G16_FLOAT,       DXGI_FORMAT_UNKNOWN,           loadToNative<GLhalf, 2>                  )));
-
-    map.insert(D3D11ES2FormatPair(GL_COMPRESSED_RGB_S3TC_DXT1_EXT,    D3D11ES2FormatInfo(DXGI_FORMAT_BC1_UNORM,          DXGI_FORMAT_BC1_UNORM,             DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,           loadCompressedBlockDataToNative<4, 4,  8>)));
-    map.insert(D3D11ES2FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,   D3D11ES2FormatInfo(DXGI_FORMAT_BC1_UNORM,          DXGI_FORMAT_BC1_UNORM,             DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,           loadCompressedBlockDataToNative<4, 4,  8>)));
-    map.insert(D3D11ES2FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, D3D11ES2FormatInfo(DXGI_FORMAT_BC2_UNORM,          DXGI_FORMAT_BC2_UNORM,             DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,           loadCompressedBlockDataToNative<4, 4, 16>)));
-    map.insert(D3D11ES2FormatPair(GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, D3D11ES2FormatInfo(DXGI_FORMAT_BC3_UNORM,          DXGI_FORMAT_BC3_UNORM,             DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,           loadCompressedBlockDataToNative<4, 4, 16>)));
-
-    return map;
-}
-
-static bool GetD3D11ES2FormatInfo(GLenum internalFormat, GLuint clientVersion, D3D11ES2FormatInfo *outFormatInfo)
-{
-    static const D3D11ES2FormatMap formatMap = BuildD3D11ES2FormatMap();
-    D3D11ES2FormatMap::const_iterator iter = formatMap.find(internalFormat);
-    if (iter != formatMap.end())
-    {
-        if (outFormatInfo)
-        {
-            *outFormatInfo = iter->second;
-        }
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-
 // A map to determine the pixel size and mipmap generation function of a given DXGI format
 struct DXGIFormatInfo
 {
@@ -637,6 +553,12 @@
     return map;
 }
 
+static const DXGIToESFormatMap &GetDXGIToESFormatMap()
+{
+    static const DXGIToESFormatMap map = BuildDXGIToESFormatMap();
+    return map;
+}
+
 static const DXGIFormatInfoMap &GetDXGIFormatInfoMap()
 {
     static const DXGIFormatInfoMap infoMap = BuildDXGIFormatInfoMap();
@@ -858,31 +780,31 @@
     return map;
 }
 
-static const SwizzleFormatInfo GetSwizzleFormatInfo(GLint internalFormat, GLuint clientVersion)
+static const SwizzleFormatInfo GetSwizzleFormatInfo(GLenum internalFormat)
 {
     // Get the maximum sized component
     unsigned int maxBits = 1;
 
-    if (gl::IsFormatCompressed(internalFormat, clientVersion))
+    if (gl::IsFormatCompressed(internalFormat))
     {
-        unsigned int compressedBitsPerBlock = gl::GetPixelBytes(internalFormat, clientVersion) * 8;
-        unsigned int blockSize = gl::GetCompressedBlockWidth(internalFormat, clientVersion) *
-                                 gl::GetCompressedBlockHeight(internalFormat, clientVersion);
+        unsigned int compressedBitsPerBlock = gl::GetPixelBytes(internalFormat) * 8;
+        unsigned int blockSize = gl::GetCompressedBlockWidth(internalFormat) *
+                                 gl::GetCompressedBlockHeight(internalFormat);
         maxBits = std::max(compressedBitsPerBlock / blockSize, maxBits);
     }
     else
     {
-        maxBits = std::max(maxBits, gl::GetAlphaBits(    internalFormat, clientVersion));
-        maxBits = std::max(maxBits, gl::GetRedBits(      internalFormat, clientVersion));
-        maxBits = std::max(maxBits, gl::GetGreenBits(    internalFormat, clientVersion));
-        maxBits = std::max(maxBits, gl::GetBlueBits(     internalFormat, clientVersion));
-        maxBits = std::max(maxBits, gl::GetLuminanceBits(internalFormat, clientVersion));
-        maxBits = std::max(maxBits, gl::GetDepthBits(    internalFormat, clientVersion));
+        maxBits = std::max(maxBits, gl::GetAlphaBits(    internalFormat));
+        maxBits = std::max(maxBits, gl::GetRedBits(      internalFormat));
+        maxBits = std::max(maxBits, gl::GetGreenBits(    internalFormat));
+        maxBits = std::max(maxBits, gl::GetBlueBits(     internalFormat));
+        maxBits = std::max(maxBits, gl::GetLuminanceBits(internalFormat));
+        maxBits = std::max(maxBits, gl::GetDepthBits(    internalFormat));
     }
 
     maxBits = roundUp(maxBits, 8U);
 
-    GLenum componentType = gl::GetComponentType(internalFormat, clientVersion);
+    GLenum componentType = gl::GetComponentType(internalFormat);
 
     const SwizzleInfoMap &map = GetSwizzleInfoMap();
     SwizzleInfoMap::const_iterator iter = map.find(SwizzleSizeType(maxBits, componentType));
@@ -922,34 +844,13 @@
     }
 }
 
-LoadImageFunction GetImageLoadFunction(GLenum internalFormat, GLenum type, GLuint clientVersion)
+LoadImageFunction GetImageLoadFunction(GLenum internalFormat, GLenum type)
 {
-    if (clientVersion == 2)
+    static const D3D11LoadFunctionMap loadImageMap = buildD3D11LoadFunctionMap();
+    D3D11LoadFunctionMap::const_iterator iter = loadImageMap.find(InternalFormatTypePair(internalFormat, type));
+    if (iter != loadImageMap.end())
     {
-        D3D11ES2FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mLoadImageFunction;
-        }
-        else
-        {
-            UNREACHABLE();
-            return NULL;
-        }
-    }
-    else if (clientVersion == 3)
-    {
-        static const D3D11LoadFunctionMap loadImageMap = buildD3D11LoadFunctionMap();
-        D3D11LoadFunctionMap::const_iterator iter = loadImageMap.find(InternalFormatTypePair(internalFormat, type));
-        if (iter != loadImageMap.end())
-        {
-            return iter->second;
-        }
-        else
-        {
-            UNREACHABLE();
-            return NULL;
-        }
+        return iter->second;
     }
     else
     {
@@ -1134,33 +1035,12 @@
 namespace gl_d3d11
 {
 
-DXGI_FORMAT GetTexFormat(GLenum internalFormat, GLuint clientVersion)
+DXGI_FORMAT GetTexFormat(GLenum internalFormat)
 {
-    if (clientVersion == 2)
+    D3D11FormatInfo d3d11FormatInfo;
+    if (GetD3D11FormatInfo(internalFormat, &d3d11FormatInfo))
     {
-        D3D11ES2FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mTexFormat;
-        }
-        else
-        {
-            UNREACHABLE();
-            return DXGI_FORMAT_UNKNOWN;
-        }
-    }
-    else if (clientVersion == 3)
-    {
-        D3D11ES3FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mTexFormat;
-        }
-        else
-        {
-            UNREACHABLE();
-            return DXGI_FORMAT_UNKNOWN;
-        }
+        return d3d11FormatInfo.mTexFormat;
     }
     else
     {
@@ -1169,33 +1049,12 @@
     }
 }
 
-DXGI_FORMAT GetSRVFormat(GLenum internalFormat, GLuint clientVersion)
+DXGI_FORMAT GetSRVFormat(GLenum internalFormat)
 {
-    if (clientVersion == 2)
+    D3D11FormatInfo d3d11FormatInfo;
+    if (GetD3D11FormatInfo(internalFormat, &d3d11FormatInfo))
     {
-        D3D11ES2FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mSRVFormat;
-        }
-        else
-        {
-            UNREACHABLE();
-            return DXGI_FORMAT_UNKNOWN;
-        }
-    }
-    else if (clientVersion == 3)
-    {
-        D3D11ES3FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mSRVFormat;
-        }
-        else
-        {
-            UNREACHABLE();
-            return DXGI_FORMAT_UNKNOWN;
-        }
+        return d3d11FormatInfo.mSRVFormat;
     }
     else
     {
@@ -1204,33 +1063,12 @@
     }
 }
 
-DXGI_FORMAT GetRTVFormat(GLenum internalFormat, GLuint clientVersion)
+DXGI_FORMAT GetRTVFormat(GLenum internalFormat)
 {
-    if (clientVersion == 2)
+    D3D11FormatInfo d3d11FormatInfo;
+    if (GetD3D11FormatInfo(internalFormat, &d3d11FormatInfo))
     {
-        D3D11ES2FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mRTVFormat;
-        }
-        else
-        {
-            UNREACHABLE();
-            return DXGI_FORMAT_UNKNOWN;
-        }
-    }
-    else if (clientVersion == 3)
-    {
-        D3D11ES3FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mRTVFormat;
-        }
-        else
-        {
-            UNREACHABLE();
-            return DXGI_FORMAT_UNKNOWN;
-        }
+        return d3d11FormatInfo.mRTVFormat;
     }
     else
     {
@@ -1239,88 +1077,68 @@
     }
 }
 
-DXGI_FORMAT GetDSVFormat(GLenum internalFormat, GLuint clientVersion)
+DXGI_FORMAT GetDSVFormat(GLenum internalFormat)
 {
-    if (clientVersion == 2)
+    D3D11FormatInfo d3d11FormatInfo;
+    if (GetD3D11FormatInfo(internalFormat, &d3d11FormatInfo))
     {
-        D3D11ES2FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES2FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mDSVFormat;
-        }
-        else
-        {
-            return DXGI_FORMAT_UNKNOWN;
-        }
-    }
-    else if (clientVersion == 3)
-    {
-        D3D11ES3FormatInfo d3d11FormatInfo;
-        if (GetD3D11ES3FormatInfo(internalFormat, clientVersion, &d3d11FormatInfo))
-        {
-            return d3d11FormatInfo.mDSVFormat;
-        }
-        else
-        {
-            return DXGI_FORMAT_UNKNOWN;
-        }
+        return d3d11FormatInfo.mDSVFormat;
     }
     else
     {
-        UNREACHABLE();
         return DXGI_FORMAT_UNKNOWN;
     }
 }
 
 // Given a GL internal format, this function returns the DSV format if it is depth- or stencil-renderable,
 // the RTV format if it is color-renderable, and the (nonrenderable) texture format otherwise.
-DXGI_FORMAT GetRenderableFormat(GLenum internalFormat, GLuint clientVersion)
+DXGI_FORMAT GetRenderableFormat(GLenum internalFormat)
 {
-    DXGI_FORMAT targetFormat = GetDSVFormat(internalFormat, clientVersion);
+    DXGI_FORMAT targetFormat = GetDSVFormat(internalFormat);
     if (targetFormat == DXGI_FORMAT_UNKNOWN)
-        targetFormat = GetRTVFormat(internalFormat, clientVersion);
+        targetFormat = GetRTVFormat(internalFormat);
     if (targetFormat == DXGI_FORMAT_UNKNOWN)
-        targetFormat = GetTexFormat(internalFormat, clientVersion);
+        targetFormat = GetTexFormat(internalFormat);
 
     return targetFormat;
 }
 
-DXGI_FORMAT GetSwizzleTexFormat(GLint internalFormat, bool renderableFormat, GLuint clientVersion)
+DXGI_FORMAT GetSwizzleTexFormat(GLint internalFormat)
 {
-    if (!renderableFormat || gl::GetComponentCount(internalFormat, clientVersion) != 4)
+    if (GetRTVFormat(internalFormat) == DXGI_FORMAT_UNKNOWN || gl::GetComponentCount(internalFormat) != 4)
     {
-        const SwizzleFormatInfo &swizzleInfo = GetSwizzleFormatInfo(internalFormat, clientVersion);
+        const SwizzleFormatInfo &swizzleInfo = GetSwizzleFormatInfo(internalFormat);
         return swizzleInfo.mTexFormat;
     }
     else
     {
-        return GetTexFormat(internalFormat, clientVersion);
+        return GetTexFormat(internalFormat);
     }
 }
 
-DXGI_FORMAT GetSwizzleSRVFormat(GLint internalFormat, bool renderableFormat, GLuint clientVersion)
+DXGI_FORMAT GetSwizzleSRVFormat(GLint internalFormat)
 {
-    if (!renderableFormat || gl::GetComponentCount(internalFormat, clientVersion) != 4)
+    if (GetRTVFormat(internalFormat) == DXGI_FORMAT_UNKNOWN || gl::GetComponentCount(internalFormat) != 4)
     {
-        const SwizzleFormatInfo &swizzleInfo = GetSwizzleFormatInfo(internalFormat, clientVersion);
+        const SwizzleFormatInfo &swizzleInfo = GetSwizzleFormatInfo(internalFormat);
         return swizzleInfo.mSRVFormat;
     }
     else
     {
-        return GetTexFormat(internalFormat, clientVersion);
+        return GetSRVFormat(internalFormat);
     }
 }
 
-DXGI_FORMAT GetSwizzleRTVFormat(GLint internalFormat, bool renderableFormat, GLuint clientVersion)
+DXGI_FORMAT GetSwizzleRTVFormat(GLint internalFormat)
 {
-    if (!renderableFormat || gl::GetComponentCount(internalFormat, clientVersion) != 4)
+    if (GetRTVFormat(internalFormat) == DXGI_FORMAT_UNKNOWN || gl::GetComponentCount(internalFormat) != 4)
     {
-        const SwizzleFormatInfo &swizzleInfo = GetSwizzleFormatInfo(internalFormat, clientVersion);
+        const SwizzleFormatInfo &swizzleInfo = GetSwizzleFormatInfo(internalFormat);
         return swizzleInfo.mRTVFormat;
     }
     else
     {
-        return GetTexFormat(internalFormat, clientVersion);
+        return GetRTVFormat(internalFormat);
     }
 }
 
@@ -1620,13 +1438,13 @@
 namespace d3d11_gl
 {
 
-GLenum GetInternalFormat(DXGI_FORMAT format, GLuint clientVersion)
+GLenum GetInternalFormat(DXGI_FORMAT format)
 {
-    static const DXGIToESFormatMap formatMap = BuildDXGIToESFormatMap();
-    auto formatIt = formatMap.find(format);
-    if (formatIt != formatMap.end())
+    const DXGIToESFormatMap &formatMap = GetDXGIToESFormatMap();
+    DXGIToESFormatMap::const_iterator iter = formatMap.find(format);
+    if (iter != formatMap.end())
     {
-        return formatIt->second;
+        return iter->second;
     }
     else
     {
diff --git a/src/libGLESv2/renderer/d3d/d3d11/formatutils11.h b/src/libGLESv2/renderer/d3d/d3d11/formatutils11.h
index fdbad3a..d77fccf 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/formatutils11.h
+++ b/src/libGLESv2/renderer/d3d/d3d11/formatutils11.h
@@ -23,7 +23,7 @@
 typedef std::set<DXGI_FORMAT> DXGIFormatSet;
 
 MipGenerationFunction GetMipGenerationFunction(DXGI_FORMAT format);
-LoadImageFunction GetImageLoadFunction(GLenum internalFormat, GLenum type, GLuint clientVersion);
+LoadImageFunction GetImageLoadFunction(GLenum internalFormat, GLenum type);
 
 GLuint GetFormatPixelBytes(DXGI_FORMAT format);
 GLuint GetBlockWidth(DXGI_FORMAT format);
@@ -47,15 +47,15 @@
 namespace gl_d3d11
 {
 
-DXGI_FORMAT GetTexFormat(GLenum internalFormat, GLuint clientVersion);
-DXGI_FORMAT GetSRVFormat(GLenum internalFormat, GLuint clientVersion);
-DXGI_FORMAT GetRTVFormat(GLenum internalFormat, GLuint clientVersion);
-DXGI_FORMAT GetDSVFormat(GLenum internalFormat, GLuint clientVersion);
-DXGI_FORMAT GetRenderableFormat(GLenum internalFormat, GLuint clientVersion);
+DXGI_FORMAT GetTexFormat(GLenum internalFormat);
+DXGI_FORMAT GetSRVFormat(GLenum internalFormat);
+DXGI_FORMAT GetRTVFormat(GLenum internalFormat);
+DXGI_FORMAT GetDSVFormat(GLenum internalFormat);
+DXGI_FORMAT GetRenderableFormat(GLenum internalFormat);
 
-DXGI_FORMAT GetSwizzleTexFormat(GLint internalFormat, bool renderableFormat, GLuint clientVersion);
-DXGI_FORMAT GetSwizzleSRVFormat(GLint internalFormat, bool renderableFormat, GLuint clientVersion);
-DXGI_FORMAT GetSwizzleRTVFormat(GLint internalFormat, bool renderableFormat, GLuint clientVersion);
+DXGI_FORMAT GetSwizzleTexFormat(GLint internalFormat);
+DXGI_FORMAT GetSwizzleSRVFormat(GLint internalFormat);
+DXGI_FORMAT GetSwizzleRTVFormat(GLint internalFormat);
 
 bool RequiresTextureDataInitialization(GLint internalFormat);
 InitializeTextureDataFunction GetTextureDataInitializationFunction(GLint internalFormat);
@@ -70,7 +70,7 @@
 namespace d3d11_gl
 {
 
-GLenum GetInternalFormat(DXGI_FORMAT format, GLuint clientVersion);
+GLenum GetInternalFormat(DXGI_FORMAT format);
 
 }
 
diff --git a/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp b/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
index d1883a6..fe1ac39 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
@@ -220,15 +220,15 @@
 namespace d3d11_gl
 {
 
-static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, GLuint clientVersion, ID3D11Device *device)
+static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, ID3D11Device *device)
 {
     gl::TextureCaps textureCaps;
 
-    DXGI_FORMAT textureFormat = gl_d3d11::GetTexFormat(internalFormat, clientVersion);
-    DXGI_FORMAT srvFormat = gl_d3d11::GetSRVFormat(internalFormat, clientVersion);
-    DXGI_FORMAT rtvFormat = gl_d3d11::GetRTVFormat(internalFormat, clientVersion);
-    DXGI_FORMAT dsvFormat = gl_d3d11::GetDSVFormat(internalFormat, clientVersion);
-    DXGI_FORMAT renderFormat = gl_d3d11::GetRenderableFormat(internalFormat, clientVersion);
+    DXGI_FORMAT textureFormat = gl_d3d11::GetTexFormat(internalFormat);
+    DXGI_FORMAT srvFormat = gl_d3d11::GetSRVFormat(internalFormat);
+    DXGI_FORMAT rtvFormat = gl_d3d11::GetRTVFormat(internalFormat);
+    DXGI_FORMAT dsvFormat = gl_d3d11::GetDSVFormat(internalFormat);
+    DXGI_FORMAT renderFormat = gl_d3d11::GetRenderableFormat(internalFormat);
 
     UINT formatSupport;
     if (SUCCEEDED(device->CheckFormatSupport(textureFormat, &formatSupport)))
@@ -265,9 +265,9 @@
 
     if (SUCCEEDED(device->CheckFormatSupport(dsvFormat, &formatSupport)))
     {
-        textureCaps.depthRendering = gl::GetDepthBits(internalFormat, clientVersion) > 0 &&
+        textureCaps.depthRendering = gl::GetDepthBits(internalFormat) > 0 &&
                                      (formatSupport & D3D11_FORMAT_SUPPORT_DEPTH_STENCIL) != 0;
-        textureCaps.stencilRendering = gl::GetStencilBits(internalFormat, clientVersion) > 0 &&
+        textureCaps.stencilRendering = gl::GetStencilBits(internalFormat) > 0 &&
                                        (formatSupport & D3D11_FORMAT_SUPPORT_DEPTH_STENCIL) != 0;
     }
 
@@ -278,11 +278,10 @@
 {
     gl::Caps caps;
 
-    const GLuint maxClientVersion = 3;
-    const gl::FormatSet &allFormats = gl::GetAllSizedInternalFormats(maxClientVersion);
+    const gl::FormatSet &allFormats = gl::GetAllSizedInternalFormats();
     for (gl::FormatSet::const_iterator internalFormat = allFormats.begin(); internalFormat != allFormats.end(); ++internalFormat)
     {
-        caps.textureCaps.insert(*internalFormat, GenerateTextureFormatCaps(*internalFormat, maxClientVersion, device));
+        caps.textureCaps.insert(*internalFormat, GenerateTextureFormatCaps(*internalFormat, device));
     }
 
     D3D_FEATURE_LEVEL featureLevel = device->GetFeatureLevel();
@@ -324,12 +323,12 @@
 namespace d3d11
 {
 
-void GenerateInitialTextureData(GLint internalFormat, GLuint clientVersion, GLuint width, GLuint height, GLuint depth,
+void GenerateInitialTextureData(GLint internalFormat, GLuint width, GLuint height, GLuint depth,
                                 GLuint mipLevels, std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
                                 std::vector< std::vector<BYTE> > *outData)
 {
     InitializeTextureDataFunction initializeFunc = gl_d3d11::GetTextureDataInitializationFunction(internalFormat);
-    DXGI_FORMAT dxgiFormat = gl_d3d11::GetTexFormat(internalFormat, clientVersion);
+    DXGI_FORMAT dxgiFormat = gl_d3d11::GetTexFormat(internalFormat);
 
     outSubresourceData->resize(mipLevels);
     outData->resize(mipLevels);
diff --git a/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.h b/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.h
index f042466..81efefa 100644
--- a/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.h
+++ b/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.h
@@ -47,7 +47,7 @@
 namespace d3d11
 {
 
-void GenerateInitialTextureData(GLint internalFormat, GLuint clientVersion, GLuint width, GLuint height, GLuint depth,
+void GenerateInitialTextureData(GLint internalFormat, GLuint width, GLuint height, GLuint depth,
                                 GLuint mipLevels, std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
                                 std::vector< std::vector<BYTE> > *outData);
 
diff --git a/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp b/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp
index b723fed..2d72729 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp
@@ -296,7 +296,7 @@
     dest->GetDesc(&destDesc);
 
     if (sourceDesc.Format == destDesc.Format && destDesc.Usage & D3DUSAGE_RENDERTARGET &&
-        d3d9_gl::IsFormatChannelEquivalent(destDesc.Format, destFormat, mRenderer->getCurrentClientVersion()))   // Can use StretchRect
+        d3d9_gl::IsFormatChannelEquivalent(destDesc.Format, destFormat))   // Can use StretchRect
     {
         RECT destRect = {xoffset, yoffset, xoffset + (sourceRect.right - sourceRect.left), yoffset + (sourceRect.bottom - sourceRect.top)};
         HRESULT result = device->StretchRect(source, &sourceRect, dest, &destRect, D3DTEXF_POINT);
diff --git a/src/libGLESv2/renderer/d3d/d3d9/Image9.cpp b/src/libGLESv2/renderer/d3d/d3d9/Image9.cpp
index d241c92..29b5ef5 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/Image9.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/Image9.cpp
@@ -387,8 +387,7 @@
     // 3D textures are not supported by the D3D9 backend.
     ASSERT(zoffset == 0 && depth == 1);
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, type, clientVersion, width, unpackAlignment);
+    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, type, width, unpackAlignment);
 
     LoadImageFunction loadFunction = d3d9::GetImageLoadFunction(mInternalFormat);
     ASSERT(loadFunction != NULL);
@@ -417,9 +416,8 @@
     // 3D textures are not supported by the D3D9 backend.
     ASSERT(zoffset == 0 && depth == 1);
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, GL_UNSIGNED_BYTE, clientVersion, width, 1);
-    GLsizei inputDepthPitch = gl::GetDepthPitch(mInternalFormat, GL_UNSIGNED_BYTE, clientVersion, width, height, 1);
+    GLsizei inputRowPitch = gl::GetRowPitch(mInternalFormat, GL_UNSIGNED_BYTE, width, 1);
+    GLsizei inputDepthPitch = gl::GetDepthPitch(mInternalFormat, GL_UNSIGNED_BYTE, width, height, 1);
 
     ASSERT(xoffset % d3d9::GetBlockWidth(mD3DFormat) == 0);
     ASSERT(yoffset % d3d9::GetBlockHeight(mD3DFormat) == 0);
diff --git a/src/libGLESv2/renderer/d3d/d3d9/RenderTarget9.cpp b/src/libGLESv2/renderer/d3d/d3d9/RenderTarget9.cpp
index 4574566..49bd9b4 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/RenderTarget9.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/RenderTarget9.cpp
@@ -56,16 +56,14 @@
 
     HRESULT result = D3DERR_INVALIDCALL;
 
-    GLuint clientVersion = mRenderer->getCurrentClientVersion();
-
     if (width > 0 && height > 0)
     {
         IDirect3DDevice9 *device = mRenderer->getDevice();
 
         bool requiresInitialization = false;
 
-        if (gl::GetDepthBits(internalFormat, clientVersion) > 0 ||
-            gl::GetStencilBits(internalFormat, clientVersion) > 0)
+        if (gl::GetDepthBits(internalFormat) > 0 ||
+            gl::GetStencilBits(internalFormat) > 0)
         {
             result = device->CreateDepthStencilSurface(width, height, renderFormat,
                                                        gl_d3d9::GetMultisampleType(supportedSamples),
diff --git a/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp b/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
index 0f64e58..49f5b3b 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
@@ -812,7 +812,6 @@
 
         gl::FramebufferAttachment *attachment = framebuffer->getFirstColorbuffer();
         GLenum internalFormat = attachment ? attachment->getInternalFormat() : GL_NONE;
-        GLuint clientVersion = getCurrentClientVersion();
 
         // Set the color mask
         bool zeroColorMaskAllowed = getAdapterVendor() != VENDOR_ID_AMD;
@@ -822,10 +821,10 @@
         // drawing is done.
         // http://code.google.com/p/angleproject/issues/detail?id=169
 
-        DWORD colorMask = gl_d3d9::ConvertColorMask(gl::GetRedBits(internalFormat, clientVersion) > 0 && blendState.colorMaskRed,
-                                                    gl::GetGreenBits(internalFormat, clientVersion) > 0 && blendState.colorMaskGreen,
-                                                    gl::GetBlueBits(internalFormat, clientVersion) > 0 && blendState.colorMaskBlue,
-                                                    gl::GetAlphaBits(internalFormat, clientVersion) > 0 && blendState.colorMaskAlpha);
+        DWORD colorMask = gl_d3d9::ConvertColorMask(gl::GetRedBits(internalFormat)   > 0 && blendState.colorMaskRed,
+                                                    gl::GetGreenBits(internalFormat) > 0 && blendState.colorMaskGreen,
+                                                    gl::GetBlueBits(internalFormat)  > 0 && blendState.colorMaskBlue,
+                                                    gl::GetAlphaBits(internalFormat) > 0 && blendState.colorMaskAlpha);
         if (colorMask == 0 && !zeroColorMaskAllowed)
         {
             // Enable green channel, but set blending so nothing will be drawn.
@@ -1126,7 +1125,7 @@
         }
     }
 
-    gl::Renderbuffer *nullRenderbuffer = new gl::Renderbuffer(this, 0, new gl::Colorbuffer(this, width, height, GL_NONE, 0));
+    gl::Renderbuffer *nullRenderbuffer = new gl::Renderbuffer(0, new gl::Colorbuffer(this, width, height, GL_NONE, 0));
     gl::RenderbufferAttachment *nullbuffer = new gl::RenderbufferAttachment(nullRenderbuffer);
 
     // add nullbuffer to the cache
@@ -1246,8 +1245,8 @@
             mDevice->SetDepthStencilSurface(depthStencilSurface);
             SafeRelease(depthStencilSurface);
 
-            depthSize = depthStencil->getDepthSize(getCurrentClientVersion());
-            stencilSize = depthStencil->getStencilSize(getCurrentClientVersion());
+            depthSize = depthStencil->getDepthSize();
+            stencilSize = depthStencil->getStencilSize();
         }
         else
         {
@@ -1770,8 +1769,7 @@
     unsigned int stencilUnmasked = 0x0;
     if (clearParams.clearStencil && frameBuffer->hasStencil())
     {
-        unsigned int stencilSize = gl::GetStencilBits(frameBuffer->getStencilbuffer()->getActualFormat(),
-                                                      getCurrentClientVersion());
+        unsigned int stencilSize = gl::GetStencilBits(frameBuffer->getStencilbuffer()->getActualFormat());
         stencilUnmasked = (0x1 << stencilSize) - 1;
     }
 
@@ -1786,16 +1784,15 @@
         GLenum internalFormat = attachment->getInternalFormat();
         GLenum actualFormat = attachment->getActualFormat();
 
-        GLuint clientVersion = getCurrentClientVersion();
-        GLuint internalRedBits = gl::GetRedBits(internalFormat, clientVersion);
-        GLuint internalGreenBits = gl::GetGreenBits(internalFormat, clientVersion);
-        GLuint internalBlueBits = gl::GetBlueBits(internalFormat, clientVersion);
-        GLuint internalAlphaBits = gl::GetAlphaBits(internalFormat, clientVersion);
+        GLuint internalRedBits = gl::GetRedBits(internalFormat);
+        GLuint internalGreenBits = gl::GetGreenBits(internalFormat);
+        GLuint internalBlueBits = gl::GetBlueBits(internalFormat);
+        GLuint internalAlphaBits = gl::GetAlphaBits(internalFormat);
 
-        GLuint actualRedBits = gl::GetRedBits(actualFormat, clientVersion);
-        GLuint actualGreenBits = gl::GetGreenBits(actualFormat, clientVersion);
-        GLuint actualBlueBits = gl::GetBlueBits(actualFormat, clientVersion);
-        GLuint actualAlphaBits = gl::GetAlphaBits(actualFormat, clientVersion);
+        GLuint actualRedBits = gl::GetRedBits(actualFormat);
+        GLuint actualGreenBits = gl::GetGreenBits(actualFormat);
+        GLuint actualBlueBits = gl::GetBlueBits(actualFormat);
+        GLuint actualAlphaBits = gl::GetAlphaBits(actualFormat);
 
         color = D3DCOLOR_ARGB(gl::unorm<8>((internalAlphaBits == 0 && actualAlphaBits > 0) ? 1.0f : clearParams.colorFClearValue.alpha),
                               gl::unorm<8>((internalRedBits   == 0 && actualRedBits   > 0) ? 0.0f : clearParams.colorFClearValue.red),
@@ -2944,13 +2941,11 @@
         inputPitch = lock.Pitch;
     }
 
-    GLuint clientVersion = getCurrentClientVersion();
-
     GLenum sourceInternalFormat = d3d9_gl::GetInternalFormat(desc.Format);
-    GLenum sourceFormat = gl::GetFormat(sourceInternalFormat, clientVersion);
-    GLenum sourceType = gl::GetType(sourceInternalFormat, clientVersion);
+    GLenum sourceFormat = gl::GetFormat(sourceInternalFormat);
+    GLenum sourceType = gl::GetType(sourceInternalFormat);
 
-    GLuint sourcePixelSize = gl::GetPixelBytes(sourceInternalFormat, clientVersion);
+    GLuint sourcePixelSize = gl::GetPixelBytes(sourceInternalFormat);
 
     if (sourceFormat == format && sourceType == type)
     {
@@ -2963,11 +2958,11 @@
     }
     else
     {
-        GLenum destInternalFormat = gl::GetSizedInternalFormat(format, type, clientVersion);
-        GLuint destPixelSize = gl::GetPixelBytes(destInternalFormat, clientVersion);
-        GLuint sourcePixelSize = gl::GetPixelBytes(sourceInternalFormat, clientVersion);
+        GLenum destInternalFormat = gl::GetSizedInternalFormat(format, type);
+        GLuint destPixelSize = gl::GetPixelBytes(destInternalFormat);
+        GLuint sourcePixelSize = gl::GetPixelBytes(sourceInternalFormat);
 
-        ColorCopyFunction fastCopyFunc = d3d9::GetFastCopyFunction(desc.Format, format, type, getCurrentClientVersion());
+        ColorCopyFunction fastCopyFunc = d3d9::GetFastCopyFunction(desc.Format, format, type);
         if (fastCopyFunc)
         {
             // Fast copy is possible through some special function
@@ -2985,7 +2980,7 @@
         else
         {
             ColorReadFunction readFunc = d3d9::GetColorReadFunction(desc.Format);
-            ColorWriteFunction writeFunc = gl::GetColorWriteFunction(format, type, clientVersion);
+            ColorWriteFunction writeFunc = gl::GetColorWriteFunction(format, type);
 
             gl::ColorF temp;
 
diff --git a/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.cpp b/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.cpp
index 60b42c1..0a44d76 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.cpp
@@ -38,14 +38,12 @@
     return static_cast<TextureStorage9*>(storage);
 }
 
-DWORD TextureStorage9::GetTextureUsage(GLenum internalformat, Renderer9 *renderer, bool renderTarget)
+DWORD TextureStorage9::GetTextureUsage(GLenum internalformat, bool renderTarget)
 {
-    GLuint clientVersion = renderer->getCurrentClientVersion();
-
     DWORD d3dusage = 0;
 
-    if (gl::GetDepthBits(internalformat, clientVersion) > 0 ||
-        gl::GetStencilBits(internalformat, clientVersion) > 0)
+    if (gl::GetDepthBits(internalformat) > 0 ||
+        gl::GetStencilBits(internalformat) > 0)
     {
         d3dusage |= D3DUSAGE_DEPTHSTENCIL;
     }
@@ -99,7 +97,7 @@
 }
 
 TextureStorage9_2D::TextureStorage9_2D(Renderer *renderer, GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, int levels)
-    : TextureStorage9(renderer, GetTextureUsage(internalformat, Renderer9::makeRenderer9(renderer), renderTarget))
+    : TextureStorage9(renderer, GetTextureUsage(internalformat, renderTarget))
 {
     mTexture = NULL;
     mRenderTarget = NULL;
@@ -195,7 +193,7 @@
 }
 
 TextureStorage9_Cube::TextureStorage9_Cube(Renderer *renderer, GLenum internalformat, bool renderTarget, int size, int levels)
-    : TextureStorage9(renderer, GetTextureUsage(internalformat, Renderer9::makeRenderer9(renderer), renderTarget))
+    : TextureStorage9(renderer, GetTextureUsage(internalformat, renderTarget))
 {
     mTexture = NULL;
     for (int i = 0; i < 6; ++i)
diff --git a/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.h b/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.h
index 1f4975f..5a09f89 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.h
+++ b/src/libGLESv2/renderer/d3d/d3d9/TextureStorage9.h
@@ -28,7 +28,7 @@
 
     static TextureStorage9 *makeTextureStorage9(TextureStorage *storage);
 
-    static DWORD GetTextureUsage(GLenum internalformat, Renderer9 *renderer, bool renderTarget);
+    static DWORD GetTextureUsage(GLenum internalformat, bool renderTarget);
 
     D3DPOOL getPool() const;
     DWORD getUsage() const;
diff --git a/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp b/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp
index d497c4d..24c75d7 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp
@@ -421,7 +421,7 @@
     }
 }
 
-ColorCopyFunction GetFastCopyFunction(D3DFORMAT sourceFormat, GLenum destFormat, GLenum destType, GLuint clientVersion)
+ColorCopyFunction GetFastCopyFunction(D3DFORMAT sourceFormat, GLenum destFormat, GLenum destType)
 {
     static const D3D9FastCopyMap fastCopyMap = BuildFastCopyMap();
     D3D9FastCopyMap::const_iterator iter = fastCopyMap.find(D3D9FastCopyFormat(sourceFormat, destFormat, destType));
@@ -808,10 +808,10 @@
     return (type != D3DMULTISAMPLE_NONMASKABLE) ? type : 0;
 }
 
-bool IsFormatChannelEquivalent(D3DFORMAT d3dformat, GLenum format, GLuint clientVersion)
+bool IsFormatChannelEquivalent(D3DFORMAT d3dformat, GLenum format)
 {
     GLenum internalFormat = d3d9_gl::GetInternalFormat(d3dformat);
-    GLenum convertedFormat = gl::GetFormat(internalFormat, clientVersion);
+    GLenum convertedFormat = gl::GetFormat(internalFormat);
     return convertedFormat == format;
 }
 
diff --git a/src/libGLESv2/renderer/d3d/d3d9/formatutils9.h b/src/libGLESv2/renderer/d3d/d3d9/formatutils9.h
index 7600658..2638879 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/formatutils9.h
+++ b/src/libGLESv2/renderer/d3d/d3d9/formatutils9.h
@@ -35,7 +35,7 @@
 const D3DFormatSet &GetAllUsedD3DFormats();
 
 ColorReadFunction GetColorReadFunction(D3DFORMAT format);
-ColorCopyFunction GetFastCopyFunction(D3DFORMAT sourceFormat, GLenum destFormat, GLenum destType, GLuint clientVersion);
+ColorCopyFunction GetFastCopyFunction(D3DFORMAT sourceFormat, GLenum destFormat, GLenum destType);
 
 VertexCopyFunction GetVertexCopyFunction(const gl::VertexFormat &vertexFormat);
 size_t GetVertexElementSize(const gl::VertexFormat &vertexFormat);
@@ -68,7 +68,7 @@
 
 GLenum GetInternalFormat(D3DFORMAT format);
 GLsizei GetSamplesCount(D3DMULTISAMPLE_TYPE type);
-bool IsFormatChannelEquivalent(D3DFORMAT d3dformat, GLenum format, GLuint clientVersion);
+bool IsFormatChannelEquivalent(D3DFORMAT d3dformat, GLenum format);
 
 }
 
diff --git a/src/libGLESv2/renderer/d3d/d3d9/renderer9_utils.cpp b/src/libGLESv2/renderer/d3d/d3d9/renderer9_utils.cpp
index 4a1dc86..8c3a333 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/renderer9_utils.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/renderer9_utils.cpp
@@ -251,7 +251,7 @@
 namespace d3d9_gl
 {
 
-static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, GLuint clientVersion, IDirect3D9 *d3d9, D3DDEVTYPE deviceType,
+static gl::TextureCaps GenerateTextureFormatCaps(GLenum internalFormat, IDirect3D9 *d3d9, D3DDEVTYPE deviceType,
                                                  UINT adapter, D3DFORMAT adapterFormat)
 {
     gl::TextureCaps textureCaps;
@@ -281,13 +281,13 @@
                                  SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
                                                                    D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, renderFormat));
 
-    textureCaps.depthRendering = gl::GetDepthBits(internalFormat, clientVersion) > 0 &&
+    textureCaps.depthRendering = gl::GetDepthBits(internalFormat) > 0 &&
                                  (SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
                                                                     D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, textureFormat)) ||
                                   SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
                                                                     D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, renderFormat)));
 
-    textureCaps.stencilRendering = gl::GetStencilBits(internalFormat, clientVersion) > 0 &&
+    textureCaps.stencilRendering = gl::GetStencilBits(internalFormat) > 0 &&
                                    (SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
                                                                       D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, textureFormat)) ||
                                     SUCCEEDED(d3d9->CheckDeviceFormat(adapter, deviceType, adapterFormat,
@@ -322,12 +322,11 @@
     D3DDISPLAYMODE currentDisplayMode;
     d3d9->GetAdapterDisplayMode(adapter, &currentDisplayMode);
 
-    const GLuint maxClientVersion = 2;
-    const gl::FormatSet &allFormats = gl::GetAllSizedInternalFormats(maxClientVersion);
+    const gl::FormatSet &allFormats = gl::GetAllSizedInternalFormats();
     for (gl::FormatSet::const_iterator internalFormat = allFormats.begin(); internalFormat != allFormats.end(); ++internalFormat)
     {
-        caps.textureCaps.insert(*internalFormat, GenerateTextureFormatCaps(*internalFormat, maxClientVersion, d3d9,
-                                                                           deviceType, adapter, currentDisplayMode.Format));
+        caps.textureCaps.insert(*internalFormat, GenerateTextureFormatCaps(*internalFormat, d3d9, deviceType, adapter,
+                                                                           currentDisplayMode.Format));
     }
 
     caps.extensions.setTextureExtensionSupport(caps.textureCaps);