=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Invalidate INDEXBUFFER device state when bound index buffer is unloaded.

Alexandre Julliard julliard at winehq.org
Mon Oct 31 14:41:10 CDT 2016


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Mon Oct 31 12:48:31 2016 +0100

wined3d: Invalidate INDEXBUFFER device state when bound index buffer is unloaded.

Fixes a regression introduced by commit
e3a8cd20ced9f33db64a35f60bc8487ae8173e47.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/buffer.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index a81cd64..13953c9 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -665,7 +665,12 @@ static void buffer_unload(struct wined3d_resource *resource)
          * happens only once per changed vertexbuffer and should occur rather
          * rarely. */
         if (resource->bind_count)
+        {
             device_invalidate_state(device, STATE_STREAMSRC);
+
+            if (buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER)
+                device_invalidate_state(device, STATE_INDEXBUFFER);
+        }
     }
 
     resource_unload(resource);




More information about the wine-cvs mailing list