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

Fixes a regression introduced by commit
e3a8cd20ce.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-10-31 12:48:31 +01:00 committed by Alexandre Julliard
parent c8eb7453a8
commit 9fef0c4910
1 changed files with 5 additions and 0 deletions

View File

@ -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);