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:
parent
1ecc334df8
commit
3f3caa3380
|
@ -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. */
|
* increasing the map count would be visible to applications. */
|
||||||
wined3d_not_from_cs(cs);
|
wined3d_not_from_cs(cs);
|
||||||
|
|
||||||
|
wined3d_resource_wait_idle(resource);
|
||||||
|
|
||||||
op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP);
|
op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP);
|
||||||
op->opcode = WINED3D_CS_OP_MAP;
|
op->opcode = WINED3D_CS_OP_MAP;
|
||||||
op->resource = resource;
|
op->resource = resource;
|
||||||
|
|
|
@ -5373,7 +5373,6 @@ HRESULT CDECL wined3d_device_context_map(struct wined3d_device_context *context,
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = sanitise_map_flags(resource, flags);
|
flags = sanitise_map_flags(resource, flags);
|
||||||
wined3d_resource_wait_idle(resource);
|
|
||||||
|
|
||||||
return context->ops->map(context, resource, sub_resource_idx, map_desc, box, flags);
|
return context->ops->map(context, resource, sub_resource_idx, map_desc, box, flags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue