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

wined3d: Go to the fallbacks for cross-swapchain blits.

parent 111e8fe7
......@@ -1285,6 +1285,7 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter)
{
const struct wined3d_swapchain *src_swapchain, *dst_swapchain;
struct wined3d_device *device = dst_surface->resource.device;
DWORD src_ds_flags, dst_ds_flags;
static const DWORD simple_blit = WINEDDBLT_ASYNC
......@@ -1310,6 +1311,27 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
goto fallback;
}
if (src_surface && src_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN)
src_swapchain = src_surface->container.u.swapchain;
else
src_swapchain = NULL;
if (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN)
dst_swapchain = dst_surface->container.u.swapchain;
else
dst_swapchain = NULL;
/* This isn't strictly needed. FBO blits for example could deal with
* cross-swapchain blits by first downloading the source to a texture
* before switching to the destination context. We just have this here to
* not have to deal with the issue, since cross-swapchain blits should be
* rare. */
if (src_swapchain && dst_swapchain && src_swapchain != dst_swapchain)
{
FIXME("Using fallback for cross-swapchain blit.\n");
goto fallback;
}
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
if (src_surface)
src_ds_flags = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
......
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