Henri Verbeet : wined3d: Set SFLAG_PIN_SYSMEM when the application tries to use surfaces that are currently mapped .
Alexandre Julliard
julliard at winehq.org
Wed Jan 11 13:39:59 CST 2012
Module: wine
Branch: master
Commit: b55e3d82cfae2cb8370d1b929ae4bb1bf9941591
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b55e3d82cfae2cb8370d1b929ae4bb1bf9941591
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Jan 10 20:36:58 2012 +0100
wined3d: Set SFLAG_PIN_SYSMEM when the application tries to use surfaces that are currently mapped.
---
dlls/wined3d/surface.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 1ff5521..f2a09dc 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2283,7 +2283,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
/* This call just uploads data, the caller is responsible for binding the
* correct texture. */
/* Context activation is done by the caller. */
-static void surface_upload_data(const struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
+static void surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_bo_address *data)
{
@@ -2294,6 +2294,12 @@ static void surface_upload_data(const struct wined3d_surface *surface, const str
surface, gl_info, debug_d3dformat(format->id), wine_dbgstr_rect(src_rect), src_pitch,
wine_dbgstr_point(dst_point), srgb, data->buffer_object, data->addr);
+ if (surface->flags & SFLAG_LOCKED)
+ {
+ WARN("Uploading a surface that is currently mapped, setting SFLAG_PIN_SYSMEM.\n");
+ surface->flags |= SFLAG_PIN_SYSMEM;
+ }
+
if (format->heightscale != 1.0f && format->heightscale != 0.0f)
update_h *= format->heightscale;
More information about the wine-cvs
mailing list