[PATCH 1/5] wined3d: Don't try to remove the location flag if it's not there in the first place.

Matteo Bruni mbruni at codeweavers.com
Mon Jan 9 08:52:43 CST 2012

Today I'm starting to send a patch series I've been working on since quite a
while. It should improve depth buffer location management, fixing some related
bugs on the way.
 dlls/wined3d/surface.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index fdc72ca..6407d94 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2041,8 +2041,10 @@ void surface_set_texture_name(struct wined3d_surface *surface, GLuint new_name,
         /* FIXME: We shouldn't need to remove SFLAG_INTEXTURE if the
          * surface has no texture name yet. See if we can get rid of this. */
         if (surface->flags & flag)
+        {
             ERR("Surface has %s set, but no texture name.\n", debug_surflocation(flag));
-        surface_modify_location(surface, flag, FALSE);
+            surface_modify_location(surface, flag, FALSE);
+        }
     *name = new_name;

More information about the wine-patches mailing list