[PATCH 2/4] wined3d: Set depth textures dirty after modifying the underlying surface.

Matteo Bruni mbruni at codeweavers.com
Thu Jan 12 10:05:18 CST 2012


---
 dlls/wined3d/surface.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

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 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
     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;
-- 
1.7.3.4




More information about the wine-patches mailing list