Henri Verbeet : wined3d: Just validate the sysmem location in surface_init( ).

Alexandre Julliard julliard at winehq.org
Mon Nov 25 13:33:15 CST 2013


Module: wine
Branch: master
Commit: 82c1d0136458e5b056fd5cb2005c74ad41b3c2f1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=82c1d0136458e5b056fd5cb2005c74ad41b3c2f1

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Nov 25 12:31:19 2013 +0100

wined3d: Just validate the sysmem location in surface_init().

This is all surface_set_dirty() really does here.

---

 dlls/wined3d/surface.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f456bb9..c947898 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -6519,10 +6519,12 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
     }
 
     surface_set_container(surface, container);
+    surface_validate_location(surface, SFLAG_INSYSMEM);
+    list_init(&surface->renderbuffers);
     list_init(&surface->overlays);
 
     /* Flags */
-    surface->flags = SFLAG_NORMCOORD; /* Default to normalized coords. */
+    surface->flags |= SFLAG_NORMCOORD; /* Default to normalized coords. */
     if (flags & WINED3D_SURFACE_DISCARD)
         surface->flags |= SFLAG_DISCARD;
     if (flags & WINED3D_SURFACE_PIN_SYSMEM)
@@ -6540,10 +6542,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
     if (lockable && (desc->usage & WINED3DUSAGE_RENDERTARGET))
         surface->flags |= SFLAG_DYNLOCK;
 
-    /* Mark the texture as dirty so that it gets loaded first time around. */
-    surface_set_dirty(surface);
-    list_init(&surface->renderbuffers);
-
     TRACE("surface %p, memory %p, size %u\n",
             surface, surface->resource.allocatedMemory, surface->resource.size);
 




More information about the wine-cvs mailing list