[PATCH 2/5] ddraw: Ignore unsupported blit flags.

Matteo Bruni matteo.mystral at gmail.com
Tue Apr 25 10:37:52 CDT 2017


2017-04-24 23:31 GMT+02:00 Henri Verbeet <hverbeet at codeweavers.com>:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
>  dlls/ddraw/surface.c      | 24 +++++++++++++++++++++---
>  dlls/ddraw/tests/ddraw1.c |  4 ++--
>  dlls/ddraw/tests/ddraw2.c |  4 ++--
>  dlls/ddraw/tests/ddraw4.c |  4 ++--
>  dlls/ddraw/tests/ddraw7.c |  4 ++--
>  5 files changed, 29 insertions(+), 11 deletions(-)
>
> diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
> index 6c4ed11..90731f0 100644
> --- a/dlls/ddraw/surface.c
> +++ b/dlls/ddraw/surface.c
> @@ -1570,6 +1570,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *
>      struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface7(iface);
>      struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface7(src_surface);
>      struct wined3d_blt_fx wined3d_fx;
> +    DWORD unsupported_flags;
>      DWORD fill_colour = 0;
>      HRESULT hr = DD_OK;
>      DDBLTFX rop_fx;
> @@ -1577,9 +1578,26 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *
>      TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
>              iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
>
> -    /* Check for validity of the flags here. WineD3D Has the software-opengl selection path and would have
> -     * to check at 2 places, and sometimes do double checks. This also saves the call to wined3d :-)
> -     */
> +    unsupported_flags = DDBLT_ALPHADEST
> +            | DDBLT_ALPHADESTCONSTOVERRIDE
> +            | DDBLT_ALPHADESTNEG
> +            | DDBLT_ALPHADESTSURFACEOVERRIDE
> +            | DDBLT_ALPHAEDGEBLEND
> +            | DDBLT_ALPHASRC
> +            | DDBLT_ALPHASRCCONSTOVERRIDE
> +            | DDBLT_ALPHASRCNEG
> +            | DDBLT_ALPHASRCSURFACEOVERRIDE
> +            | DDBLT_ZBUFFER
> +            | DDBLT_ZBUFFERDESTCONSTOVERRIDE
> +            | DDBLT_ZBUFFERDESTOVERRIDE
> +            | DDBLT_ZBUFFERSRCCONSTOVERRIDE
> +            | DDBLT_ZBUFFERSRCOVERRIDE;

Hardly going to matter but wouldn't it be better as a static const?



More information about the wine-devel mailing list