wined3d: Set SFLAG_PIN_SYSMEM when the application tries to use surfaces that are currently mapped.
This commit is contained in:
parent
5112699a6b
commit
b55e3d82cf
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue