From 3f3caa338079d22bd20326d92c921d697360d67e Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 5 May 2021 22:23:11 -0500 Subject: [PATCH] wined3d: Wait for the resource to become idle in wined3d_cs_map(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 2 ++ dlls/wined3d/device.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index d70792084e8..8a78ad13dd2 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -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; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8f9ca725fd5..085ff70ad76 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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); }