From 2aa5b0011a657cd99690783b0c02491105ee799a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 15 Aug 2018 11:09:51 +0200 Subject: [PATCH] wined3d: Allow copying between different texture types. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b7e8cecca32..5079113120e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4090,14 +4090,6 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev return WINED3DERR_INVALIDCALL; } - if (src_resource->type != dst_resource->type) - { - WARN("Resource types (%s / %s) don't match.\n", - debug_d3dresourcetype(dst_resource->type), - debug_d3dresourcetype(src_resource->type)); - return WINED3DERR_INVALIDCALL; - } - if (src_resource->format->typeless_id != dst_resource->format->typeless_id || (!src_resource->format->typeless_id && src_resource->format->id != dst_resource->format->id)) { @@ -4109,6 +4101,14 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev if (dst_resource->type == WINED3D_RTYPE_BUFFER) { + if (src_resource->type != WINED3D_RTYPE_BUFFER) + { + WARN("Resource types (%s / %s) don't match.\n", + debug_d3dresourcetype(dst_resource->type), + debug_d3dresourcetype(src_resource->type)); + return WINED3DERR_INVALIDCALL; + } + if (dst_sub_resource_idx) { WARN("Invalid dst_sub_resource_idx %u.\n", dst_sub_resource_idx);