Commit b55e3d82 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Set SFLAG_PIN_SYSMEM when the application tries to use surfaces that are currently mapped.

parent 5112699a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment