Commit f4c8d814 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Use wined3d_texture_get_sub_resource_desc() in d3d9_device_GetRenderTargetData().

parent cd25ecff
......@@ -1281,23 +1281,20 @@ static HRESULT WINAPI d3d9_device_GetRenderTargetData(IDirect3DDevice9Ex *iface,
{
struct d3d9_surface *rt_impl = unsafe_impl_from_IDirect3DSurface9(render_target);
struct d3d9_surface *dst_impl = unsafe_impl_from_IDirect3DSurface9(dst_surface);
struct wined3d_resource_desc wined3d_desc;
struct wined3d_resource *sub_resource;
struct wined3d_sub_resource_desc wined3d_desc;
RECT dst_rect, src_rect;
HRESULT hr;
TRACE("iface %p, render_target %p, dst_surface %p.\n", iface, render_target, dst_surface);
wined3d_mutex_lock();
sub_resource = wined3d_texture_get_sub_resource(dst_impl->wined3d_texture, dst_impl->sub_resource_idx);
wined3d_resource_get_desc(sub_resource, &wined3d_desc);
wined3d_texture_get_sub_resource_desc(dst_impl->wined3d_texture, dst_impl->sub_resource_idx, &wined3d_desc);
dst_rect.left = 0;
dst_rect.top = 0;
dst_rect.right = wined3d_desc.width;
dst_rect.bottom = wined3d_desc.height;
sub_resource = wined3d_texture_get_sub_resource(rt_impl->wined3d_texture, rt_impl->sub_resource_idx);
wined3d_resource_get_desc(sub_resource, &wined3d_desc);
wined3d_texture_get_sub_resource_desc(rt_impl->wined3d_texture, rt_impl->sub_resource_idx, &wined3d_desc);
src_rect.left = 0;
src_rect.top = 0;
src_rect.right = wined3d_desc.width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment