On 15 October 2015 at 15:41, Riccardo Bortolato rikyz619@gmail.com wrote:
+HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect_in,
struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const RECT *src_rect_in, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
+{
- struct wined3d_resource *dst_resource, *src_resource;
- TRACE("dst_texture %p, dst_sub_resource_idx %u, src_texture %p, src_sub_resource_idx %u.\n",
dst_texture, dst_sub_resource_idx, src_texture, src_sub_resource_idx);
- dst_resource = wined3d_texture_get_sub_resource(dst_texture, dst_sub_resource_idx);
- src_resource = wined3d_texture_get_sub_resource(src_texture, src_sub_resource_idx);
- if (!dst_resource || !src_resource)
return WINED3DERR_INVALIDCALL;
- return wined3d_surface_blt(surface_from_resource(dst_resource), dst_rect_in,
surface_from_resource(src_resource), src_rect_in, flags, fx, filter);
+}
You can't assume src_resource and dst_resource are surfaces.