Make sure the driver knows the texture is dirty when only lower level mipmaps are updated.

TRAC #21588
Issue=353
Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@1287 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index 694124d..33f9eaf 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -1440,6 +1440,11 @@
     {
         HRESULT result = mTexture->GetSurfaceLevel(level + mLodOffset, &surface);
         ASSERT(SUCCEEDED(result));
+
+        if (level != 0)
+        {
+            mTexture->AddDirtyRect(NULL);
+        }
     }
 
     return surface;
@@ -2164,8 +2169,14 @@
 
     if (mTexture)
     {
-        HRESULT result = mTexture->GetCubeMapSurface(es2dx::ConvertCubeFace(faceTarget), level + mLodOffset, &surface);
+        D3DCUBEMAP_FACES face = es2dx::ConvertCubeFace(faceTarget);
+        HRESULT result = mTexture->GetCubeMapSurface(face, level + mLodOffset, &surface);
         ASSERT(SUCCEEDED(result));
+
+        if (level != 0)
+        {
+            mTexture->AddDirtyRect(face, NULL);
+        }
     }
 
     return surface;