From db6f95880c2631b64e48adc547d365e878ae45a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 9 Aug 2018 13:26:42 +0200 Subject: [PATCH] wined3d: Reject cross-device blits. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DirectDraw tests show that cross-device blits are supposed to work for limited cases between system memory surfaces. However, cross-device blits are unsafe in wined3d, especially with CSMT enabled. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45382 Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/texture.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index ebdacfa2ee0..4947a5618d6 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -3119,6 +3119,12 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned return WINED3DERR_INVALIDCALL; } + if (dst_texture->resource.device != src_texture->resource.device) + { + FIXME("Rejecting cross-device blit.\n"); + return E_NOTIMPL; + } + wined3d_cs_emit_blt_sub_resource(dst_texture->resource.device->cs, &dst_texture->resource, dst_sub_resource_idx, &dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter);