wined3d: Set depth textures dirty after modifying the underlying surface.
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index bf379f1..64e8646 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5578,6 +5578,16 @@
     if (!(surface->rb_multisample))
         location &= ~SFLAG_INRB_MULTISAMPLE;
 
+    if (((surface->flags & SFLAG_INTEXTURE) && !(location & SFLAG_INTEXTURE))
+            || (!(surface->flags & SFLAG_INTEXTURE) && (location & SFLAG_INTEXTURE)))
+    {
+        if (surface->container.type == WINED3D_CONTAINER_TEXTURE)
+        {
+            TRACE("Passing to container.\n");
+            wined3d_texture_set_dirty(surface->container.u.texture, TRUE);
+        }
+    }
+
     surface->ds_current_size.cx = w;
     surface->ds_current_size.cy = h;
     surface->flags &= ~SFLAG_LOCATIONS;