From 9240316552160abc754261c608afe33a9900291b Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 26 Mar 2018 14:00:37 +0430 Subject: [PATCH] wined3d: Get rid of the special case for WINED3D_RTYPE_TEXTURE_3D in wined3d_device_update_texture(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/device.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7f211f23fec..29083ea1c7d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3820,12 +3820,9 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, level_count = min(src_level_count, dst_level_count); src_size = max(src_texture->resource.width, src_texture->resource.height); + src_size = max(src_size, src_texture->resource.depth); dst_size = max(dst_texture->resource.width, dst_texture->resource.height); - if (type == WINED3D_RTYPE_TEXTURE_3D) - { - src_size = max(src_size, src_texture->resource.depth); - dst_size = max(dst_size, dst_texture->resource.depth); - } + dst_size = max(dst_size, dst_texture->resource.depth); while (src_size > dst_size) { src_size >>= 1;