Henri Verbeet : wined3d: Use draw_binding in device_clear_render_targets().

Alexandre Julliard julliard at winehq.org
Wed Aug 24 14:05:20 CDT 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Aug 23 20:08:10 2011 +0200

wined3d: Use draw_binding in device_clear_render_targets().

---

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

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index cdc1827..3a3692b 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -668,7 +668,9 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
     {
         for (i = 0; i < rt_count; ++i)
         {
-            if (fb->render_targets[i]) surface_load_location(fb->render_targets[i], SFLAG_INDRAWABLE, NULL);
+            struct wined3d_surface *rt = fb->render_targets[i];
+            if (rt)
+                surface_load_location(rt, rt->draw_binding, NULL);
         }
     }
 
@@ -727,7 +729,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
 
     if (flags & WINED3DCLEAR_ZBUFFER)
     {
-        surface_modify_location(fb->depth_stencil, SFLAG_INDRAWABLE, TRUE);
+        surface_modify_location(fb->depth_stencil, fb->depth_stencil->draw_binding, TRUE);
 
         glDepthMask(GL_TRUE);
         context_invalidate_state(context, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
@@ -740,7 +742,10 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
     {
         for (i = 0; i < rt_count; ++i)
         {
-            if (fb->render_targets[i]) surface_modify_location(fb->render_targets[i], SFLAG_INDRAWABLE, TRUE);
+            struct wined3d_surface *rt = fb->render_targets[i];
+
+            if (rt)
+                surface_modify_location(rt, rt->draw_binding, TRUE);
         }
 
         glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);




More information about the wine-cvs mailing list