wined3d: Sanitise clear flags passed to blitters.

In order to not trigger "if (flags)" conditions in ffp_blitter_clear()
unnecessarily.  Also, avoids passing WINED3DCLEAR_SYNCHRONOUS, which is handled
at the level of command stream.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Józef Kucia 2019-01-10 15:10:13 +01:00 committed by Alexandre Julliard
parent ebe15537d1
commit 2727a6ecf6
1 changed files with 2 additions and 2 deletions

View File

@ -612,7 +612,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
op = wined3d_cs_require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]),
WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_CLEAR;
op->flags = flags;
op->flags = flags & (WINED3DCLEAR_TARGET | WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL);
op->rt_count = rt_count;
op->fb = &cs->fb;
SetRect(&op->draw_rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height);
@ -655,7 +655,7 @@ void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined
op->fb = (void *)&op->rects[1];
op->opcode = WINED3D_CS_OP_CLEAR;
op->flags = flags;
op->flags = flags & (WINED3DCLEAR_TARGET | WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL);
if (flags & WINED3DCLEAR_TARGET)
{
op->rt_count = 1;