wined3d: Make blits asynchronous by default.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Henri Verbeet 2017-04-24 23:31:31 +02:00 committed by Alexandre Julliard
parent 6b41501344
commit 5ff2fdc452
3 changed files with 13 additions and 22 deletions

View File

@ -1408,6 +1408,7 @@ static HRESULT ddraw_surface_blt(struct ddraw_surface *dst_surface, const RECT *
{
struct wined3d_device *wined3d_device = dst_surface->ddraw->wined3d_device;
struct wined3d_color colour;
DWORD wined3d_flags;
if (flags & DDBLT_COLORFILL)
{
@ -1431,14 +1432,18 @@ static HRESULT ddraw_surface_blt(struct ddraw_surface *dst_surface, const RECT *
dst_rect, WINED3DCLEAR_ZBUFFER, NULL, colour.r, 0);
}
if (flags & ~WINED3D_BLT_MASK)
wined3d_flags = flags & ~DDBLT_ASYNC;
if (wined3d_flags & ~WINED3D_BLT_MASK)
{
FIXME("Unhandled flags %#x.\n", flags);
return E_NOTIMPL;
}
if (!(flags & DDBLT_ASYNC))
wined3d_flags |= WINED3D_BLT_SYNCHRONOUS;
return wined3d_texture_blt(dst_surface->wined3d_texture, dst_surface->sub_resource_idx, dst_rect,
src_surface->wined3d_texture, src_surface->sub_resource_idx, src_rect, flags, fx, filter);
src_surface->wined3d_texture, src_surface->sub_resource_idx, src_rect, wined3d_flags, fx, filter);
}
static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, const RECT *dst_rect_in,
@ -4231,10 +4236,10 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurfac
{
struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface7(iface);
struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface7(src_surface);
DWORD flags = WINED3D_BLT_SYNCHRONOUS;
DWORD src_w, src_h, dst_w, dst_h;
HRESULT hr = DD_OK;
RECT dst_rect, s;
DWORD flags = 0;
TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), trans);

View File

@ -3564,11 +3564,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
BOOL scale, convert;
DWORD dst_location;
static const DWORD simple_blit = WINED3D_BLT_ASYNC
| WINED3D_BLT_SRC_CKEY
static const DWORD simple_blit = WINED3D_BLT_SRC_CKEY
| WINED3D_BLT_SRC_CKEY_OVERRIDE
| WINED3D_BLT_WAIT
| WINED3D_BLT_DO_NOT_WAIT
| WINED3D_BLT_ALPHA_TEST;
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
@ -3590,18 +3587,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
if (!fx || !(fx->fx))
flags &= ~WINED3D_BLT_FX;
if (flags & WINED3D_BLT_WAIT)
flags &= ~WINED3D_BLT_WAIT;
if (flags & WINED3D_BLT_ASYNC)
{
static unsigned int once;
if (!once++)
FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n");
flags &= ~WINED3D_BLT_ASYNC;
}
/* WINED3D_BLT_DO_NOT_WAIT appeared in DX7. */
if (flags & WINED3D_BLT_DO_NOT_WAIT)
{
@ -3609,9 +3594,10 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
if (!once++)
FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
flags &= ~WINED3D_BLT_DO_NOT_WAIT;
}
flags &= ~(WINED3D_BLT_SYNCHRONOUS | WINED3D_BLT_DO_NOT_WAIT | WINED3D_BLT_WAIT);
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");

View File

@ -1309,7 +1309,6 @@ enum wined3d_shader_byte_code_format
/* add dwZBufferBaseDest to every source z value before compare */
#define WINEDDBLTFX_ZBUFFERBASEDEST 0x00000100
#define WINED3D_BLT_ASYNC 0x00000200
#define WINED3D_BLT_FX 0x00000800
#define WINED3D_BLT_DST_CKEY 0x00002000
#define WINED3D_BLT_DST_CKEY_OVERRIDE 0x00004000
@ -1317,8 +1316,9 @@ enum wined3d_shader_byte_code_format
#define WINED3D_BLT_SRC_CKEY_OVERRIDE 0x00010000
#define WINED3D_BLT_WAIT 0x01000000
#define WINED3D_BLT_DO_NOT_WAIT 0x08000000
#define WINED3D_BLT_SYNCHRONOUS 0x40000000
#define WINED3D_BLT_ALPHA_TEST 0x80000000
#define WINED3D_BLT_MASK 0x0901ea00
#define WINED3D_BLT_MASK 0x0901e800
/* dwFlags for GetBltStatus */
#define WINEDDGBS_CANBLT 0x00000001