Matteo Bruni : wined3d: Make the entire surface current after clearing a discarded depth buffer.

Alexandre Julliard julliard at winehq.org
Wed Apr 10 14:16:16 CDT 2013


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Apr 10 01:35:44 2013 +0200

wined3d: Make the entire surface current after clearing a discarded depth buffer.

---

 dlls/wined3d/device.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f94d77a..6b5c9dc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -501,6 +501,14 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
 {
     RECT current_rect, r;
 
+    if (ds->flags & SFLAG_DISCARDED)
+    {
+        /* Depth buffer was discarded, make it entirely current in its new location since
+         * there is no other place where we would get data anyway. */
+        SetRect(out_rect, 0, 0, ds->resource.width, ds->resource.height);
+        return;
+    }
+
     if (ds->flags & location)
         SetRect(&current_rect, 0, 0,
                 ds->ds_current_size.cx,




More information about the wine-cvs mailing list