wined3d: Clean up fallback paths in wined3d_surface_blt().

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2019-08-13 22:02:11 +02:00 committed by Alexandre Julliard
parent fdf37d3e51
commit b3bf2c4f26
1 changed files with 6 additions and 10 deletions

View File

@ -2939,14 +2939,14 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
WARN("D3D not initialized, using CPU blit fallback.\n");
goto cpu;
}
if (flags & ~simple_blit)
{
WARN_(d3d_perf)("Using fallback for complex blit (%#x).\n", flags);
goto fallback;
WARN_(d3d_perf)("Using CPU fallback for complex blit (%#x).\n", flags);
goto cpu;
}
src_swapchain = src_texture->swapchain;
@ -2960,7 +2960,9 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
if (src_swapchain && dst_swapchain && src_swapchain != dst_swapchain)
{
FIXME("Using fallback for cross-swapchain blit.\n");
goto fallback;
if (SUCCEEDED(wined3d_texture_blt_special(dst_texture, dst_sub_resource_idx, &dst_rect,
src_texture, src_sub_resource_idx, &src_rect, flags, fx, filter)))
return WINED3D_OK;
}
scale = src_box->right - src_box->left != dst_box->right - dst_box->left
@ -3121,12 +3123,6 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
return WINED3D_OK;
fallback:
/* Special cases for render targets. */
if (SUCCEEDED(wined3d_texture_blt_special(dst_texture, dst_sub_resource_idx, &dst_rect,
src_texture, src_sub_resource_idx, &src_rect, flags, fx, filter)))
return WINED3D_OK;
cpu:
return surface_cpu_blt(dst_texture, dst_sub_resource_idx, dst_box,
src_texture, src_sub_resource_idx, src_box, flags, fx, filter);