[PATCH 1/5] wined3d: Get rid of the render target / overlay check in wined3d_surface_flip().

Henri Verbeet hverbeet at codeweavers.com
Wed Sep 11 01:47:48 CDT 2013


The surface needs to be part of a swapchain to be flipped, but that doesn't
have much to do with WINED3DUSAGE_RENDERTARGET. We can just remove the check
here, because ddraw_surface7_Flip() already has the correct check.
---
 dlls/wined3d/surface.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index dbf6fef..87ae02d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3706,13 +3706,6 @@ HRESULT CDECL wined3d_surface_flip(struct wined3d_surface *surface, struct wined
         return WINEDDERR_NOTFLIPPABLE;
     }
 
-    /* Flipping is only supported on render targets and overlays. */
-    if (!(surface->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_OVERLAY)))
-    {
-        WARN("Tried to flip a non-render target, non-overlay surface.\n");
-        return WINEDDERR_NOTFLIPPABLE;
-    }
-
     flip_surface(surface, override);
 
     /* Update overlays if they're visible. */
-- 
1.7.10.4




More information about the wine-patches mailing list