From b3b2a5599454d2e8373819271a883981f09ef73c Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 12 Oct 2022 14:55:39 +0200 Subject: [PATCH] wined3d: Use the supplied context in wined3d_device_context_blt(). Applications calling wined3d_device_context_resolve_sub_resource() on a deferred context would instead get this scheduled on the immediate context. Worse, because the original call was intended for a deferred context, we'd do this without taking the mutex required for immediate contexts, potentially corrupting the command stream. --- dlls/wined3d/texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index c76a50ea6ae..f385394497b 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -4168,8 +4168,8 @@ HRESULT CDECL wined3d_device_context_blt(struct wined3d_device_context *context, return E_NOTIMPL; } - wined3d_device_context_emit_blt_sub_resource(&dst_texture->resource.device->cs->c, &dst_texture->resource, - dst_sub_resource_idx, &dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter); + wined3d_device_context_emit_blt_sub_resource(context, &dst_texture->resource, dst_sub_resource_idx, + &dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter); if (dst_texture->dirty_regions) wined3d_texture_add_dirty_region(dst_texture, dst_sub_resource_idx, &dst_box); -- 2.11.4.GIT