Commit e906468c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Call prepare_upload_bo in wined3d_device_context_emit_map() only for…

wined3d: Call prepare_upload_bo in wined3d_device_context_emit_map() only for DISCARD or NOOVERWRITE maps. We can't do an asynchronous upload with just WINED3D_MAP_WRITE, but we can with update_sub_resource, and prepare_upload_bo doesn't know which it was called from. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 36916804
......@@ -2463,7 +2463,8 @@ HRESULT wined3d_device_context_emit_map(struct wined3d_device_context *context,
wined3d_resource_get_sub_resource_map_pitch(resource, sub_resource_idx, &row_pitch, &slice_pitch);
if ((*map_ptr = context->ops->prepare_upload_bo(context, resource,
if ((flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE))
&& (*map_ptr = context->ops->prepare_upload_bo(context, resource,
sub_resource_idx, box, row_pitch, slice_pitch, flags, &addr)))
{
TRACE("Returning upload bo %s, map pointer %p, row pitch %u, slice pitch %u.\n",
......
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