d3d9: Replace wined3d_surface_get_render_target_data with wined3d_texture_blt in d3d9_device_GetRenderTargetData.
Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d05736d2d9
commit
3b02ae89a8
|
@ -1265,12 +1265,22 @@ 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;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, render_target %p, dst_surface %p.\n", iface, render_target, dst_surface);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
hr = wined3d_surface_get_render_target_data(dst_impl->wined3d_surface, rt_impl->wined3d_surface);
|
||||
sub_resource = wined3d_texture_get_sub_resource(rt_impl->wined3d_texture, rt_impl->sub_resource_idx);
|
||||
wined3d_resource_get_desc(sub_resource, &wined3d_desc);
|
||||
|
||||
/* TODO: Check surface sizes, pools, etc. */
|
||||
if (wined3d_desc.multisample_type)
|
||||
hr = D3DERR_INVALIDCALL;
|
||||
else
|
||||
hr = wined3d_texture_blt(dst_impl->wined3d_texture, dst_impl->sub_resource_idx, NULL,
|
||||
rt_impl->wined3d_texture, rt_impl->sub_resource_idx, NULL, 0, NULL, WINED3D_TEXF_POINT);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
|
|
|
@ -1100,19 +1100,6 @@ static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, DW
|
|||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *surface,
|
||||
struct wined3d_surface *render_target)
|
||||
{
|
||||
TRACE("surface %p, render_target %p.\n", surface, render_target);
|
||||
|
||||
/* TODO: Check surface sizes, pools, etc. */
|
||||
|
||||
if (render_target->resource.multisample_type)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
return wined3d_surface_blt(surface, NULL, render_target, NULL, 0, NULL, WINED3D_TEXF_POINT);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void surface_remove_pbo(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
|
|
|
@ -225,7 +225,6 @@
|
|||
@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr)
|
||||
@ cdecl wined3d_surface_get_parent(ptr)
|
||||
@ cdecl wined3d_surface_get_pitch(ptr)
|
||||
@ cdecl wined3d_surface_get_render_target_data(ptr ptr)
|
||||
@ cdecl wined3d_surface_get_resource(ptr)
|
||||
@ cdecl wined3d_surface_getdc(ptr ptr)
|
||||
@ cdecl wined3d_surface_incref(ptr)
|
||||
|
|
|
@ -2478,8 +2478,6 @@ struct wined3d_surface * __cdecl wined3d_surface_from_resource(struct wined3d_re
|
|||
HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y);
|
||||
void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
|
||||
DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);
|
||||
HRESULT __cdecl wined3d_surface_get_render_target_data(struct wined3d_surface *surface,
|
||||
struct wined3d_surface *render_target);
|
||||
struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
|
||||
HRESULT __cdecl wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc);
|
||||
ULONG __cdecl wined3d_surface_incref(struct wined3d_surface *surface);
|
||||
|
|
Loading…
Reference in New Issue