Henri Verbeet : wined3d: Only try to load surfaces from the drawable if the drawable is current in surface_load_sysmem ().
Alexandre Julliard
julliard at winehq.org
Mon Oct 24 13:43:53 CDT 2011
Module: wine
Branch: master
Commit: 4229d865d27dd81c23c8bbb72cd834cf0d659609
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4229d865d27dd81c23c8bbb72cd834cf0d659609
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Oct 23 18:23:57 2011 +0200
wined3d: Only try to load surfaces from the drawable if the drawable is current in surface_load_sysmem().
---
dlls/wined3d/surface.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 54cacbd..54b46b1 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5809,9 +5809,15 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
return;
}
- /* Note: It might be faster to download into a texture first. */
- read_from_framebuffer(surface, rect, surface->resource.allocatedMemory,
- wined3d_surface_get_pitch(surface));
+ if (surface->flags & SFLAG_INDRAWABLE)
+ {
+ read_from_framebuffer(surface, rect, surface->resource.allocatedMemory,
+ wined3d_surface_get_pitch(surface));
+ return;
+ }
+
+ FIXME("Can't load surface %p with location flags %#x into sysmem.\n",
+ surface, surface->flags & SFLAG_LOCATIONS);
}
static HRESULT surface_load_drawable(struct wined3d_surface *surface,
More information about the wine-cvs
mailing list