Module: wine Branch: master Commit: 2727a6ecf69397a988c29d168dc467fb7081f59c URL: https://source.winehq.org/git/wine.git/?a=commit;h=2727a6ecf69397a988c29d168...
Author: Józef Kucia jkucia@codeweavers.com Date: Thu Jan 10 15:10:13 2019 +0100
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
---
dlls/wined3d/cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index aa8eef7..c67cc6c 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -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;