d3d9: Use wined3d_texture_get_sub_resource_desc() in d3d9_device_StretchRect().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5cb8f0d0dd
commit
4917b98753
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue