From 4917b987531b6fd64cc2c1dfe27050f141919e14 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 1 Mar 2016 19:31:42 +0100 Subject: [PATCH] d3d9: Use wined3d_texture_get_sub_resource_desc() in d3d9_device_StretchRect(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d9/device.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index bd94712abf2..718de91a877 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1335,17 +1335,15 @@ static HRESULT WINAPI d3d9_device_StretchRect(IDirect3DDevice9Ex *iface, IDirect struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); struct d3d9_surface *src = unsafe_impl_from_IDirect3DSurface9(src_surface); struct d3d9_surface *dst = unsafe_impl_from_IDirect3DSurface9(dst_surface); + struct wined3d_sub_resource_desc src_desc, dst_desc; HRESULT hr = D3DERR_INVALIDCALL; - struct wined3d_resource_desc src_desc, dst_desc; - struct wined3d_resource *sub_resource; RECT d, s; TRACE("iface %p, src_surface %p, src_rect %p, dst_surface %p, dst_rect %p, filter %#x.\n", iface, src_surface, src_rect, dst_surface, dst_rect, filter); wined3d_mutex_lock(); - sub_resource = wined3d_texture_get_sub_resource(dst->wined3d_texture, dst->sub_resource_idx); - wined3d_resource_get_desc(sub_resource, &dst_desc); + wined3d_texture_get_sub_resource_desc(dst->wined3d_texture, dst->sub_resource_idx, &dst_desc); if (!dst_rect) { d.left = 0; @@ -1355,8 +1353,7 @@ static HRESULT WINAPI d3d9_device_StretchRect(IDirect3DDevice9Ex *iface, IDirect dst_rect = &d; } - sub_resource = wined3d_texture_get_sub_resource(src->wined3d_texture, src->sub_resource_idx); - wined3d_resource_get_desc(sub_resource, &src_desc); + wined3d_texture_get_sub_resource_desc(src->wined3d_texture, src->sub_resource_idx, &src_desc); if (!src_rect) { s.left = 0;