wined3d: Wait for the resource to become idle in wined3d_cs_map().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-05-05 22:23:11 -05:00 committed by Alexandre Julliard
parent 1ecc334df8
commit 3f3caa3380
2 changed files with 2 additions and 1 deletions

View File

@ -2303,6 +2303,8 @@ static HRESULT wined3d_cs_map(struct wined3d_device_context *context, struct win
* increasing the map count would be visible to applications. */
wined3d_not_from_cs(cs);
wined3d_resource_wait_idle(resource);
op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op->opcode = WINED3D_CS_OP_MAP;
op->resource = resource;

View File

@ -5373,7 +5373,6 @@ HRESULT CDECL wined3d_device_context_map(struct wined3d_device_context *context,
}
flags = sanitise_map_flags(resource, flags);
wined3d_resource_wait_idle(resource);
return context->ops->map(context, resource, sub_resource_idx, map_desc, box, flags);
}