Henri Verbeet : wined3d: Also unbind stream outputs and the geometry shader in stateblock_unbind_resources ().

Alexandre Julliard julliard at winehq.org
Thu Nov 29 14:15:44 CST 2012


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Nov 28 22:11:47 2012 +0100

wined3d: Also unbind stream outputs and the geometry shader in stateblock_unbind_resources().

---

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

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index c399bad..9b71486 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -491,6 +491,15 @@ void stateblock_unbind_resources(struct wined3d_stateblock *stateblock)
         }
     }
 
+    for (i = 0; i < MAX_STREAM_OUT; ++i)
+    {
+        if ((buffer = state->stream_output[i].buffer))
+        {
+            state->stream_output[i].buffer = NULL;
+            wined3d_buffer_decref(buffer);
+        }
+    }
+
     for (i = 0; i < MAX_STREAMS; ++i)
     {
         if ((buffer = state->streams[i].buffer))
@@ -512,6 +521,12 @@ void stateblock_unbind_resources(struct wined3d_stateblock *stateblock)
         wined3d_shader_decref(shader);
     }
 
+    if ((shader = state->geometry_shader))
+    {
+        state->geometry_shader = NULL;
+        wined3d_shader_decref(shader);
+    }
+
     if ((shader = state->pixel_shader))
     {
         state->pixel_shader = NULL;




More information about the wine-cvs mailing list