Henri Verbeet : wined3d: Only invalidate state for the current context in device_clear_render_targets ().

Alexandre Julliard julliard at winehq.org
Thu Jul 28 13:55:40 CDT 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Jul 27 21:13:35 2011 +0200

wined3d: Only invalidate state for the current context in device_clear_render_targets().

---

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

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f1901bf..e3e6848 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -707,10 +707,10 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
         if (context->gl_info->supported[EXT_STENCIL_TWO_SIDE])
         {
             glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
-            device_invalidate_state(device, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE));
+            context_invalidate_state(context, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE));
         }
         glStencilMask(~0U);
-        device_invalidate_state(device, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
+        context_invalidate_state(context, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
         glClearStencil(stencil);
         checkGLcall("glClearStencil");
         clear_mask = clear_mask | GL_STENCIL_BUFFER_BIT;
@@ -730,7 +730,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
         surface_modify_location(fb->depth_stencil, SFLAG_INDRAWABLE, TRUE);
 
         glDepthMask(GL_TRUE);
-        device_invalidate_state(device, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
+        context_invalidate_state(context, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
         glClearDepth(depth);
         checkGLcall("glClearDepth");
         clear_mask = clear_mask | GL_DEPTH_BUFFER_BIT;
@@ -744,10 +744,10 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
         }
 
         glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-        device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
-        device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
-        device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE2));
-        device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE3));
+        context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
+        context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
+        context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE2));
+        context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE3));
         glClearColor(color->r, color->g, color->b, color->a);
         checkGLcall("glClearColor");
         clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;




More information about the wine-cvs mailing list