Józef Kucia : wined3d: Allow copying between different texture types.
Module: wine Branch: stable Commit: 7a325e567b5f879b39d4005b759b4ab2879cd2a0 URL: https://source.winehq.org/git/wine.git/?a=commit;h=7a325e567b5f879b39d4005b7... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Aug 15 11:09:51 2018 +0200 wined3d: Allow copying between different texture types. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2aa5b0011a657cd99690783b0c02491105ee799a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- 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 a25b98d..d5c12b8 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4089,14 +4089,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)) { @@ -4108,6 +4100,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);
participants (1)
-
Alexandre Julliard