Henri Verbeet : wined3d: Avoid using the CPU blitter for clearing either depth or stencil on combined formats.

Alexandre Julliard julliard at winehq.org
Mon Jul 17 15:37:19 CDT 2017


Module: wine
Branch: master
Commit: 92d030c41edf15818d8ee4fb9cfd5007cc98e97e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=92d030c41edf15818d8ee4fb9cfd5007cc98e97e

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jul 17 14:01:40 2017 +0200

wined3d: Avoid using the CPU blitter for clearing either depth or stencil on combined formats.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/surface.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d5820bd..58a4388 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2595,8 +2595,10 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de
         }
     }
 
-    if ((flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
-            && (view = fb->depth_stencil) && ffp_blitter_use_cpu_clear(view))
+    if ((flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL)) && (view = fb->depth_stencil)
+            && (!view->format->depth_size || (flags & WINED3DCLEAR_ZBUFFER))
+            && (!view->format->stencil_size || (flags & WINED3DCLEAR_STENCIL))
+            && ffp_blitter_use_cpu_clear(view))
     {
         next_flags |= flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL);
         flags &= ~(WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL);




More information about the wine-cvs mailing list