Commit 9fef0c49 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

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

Fixes a regression introduced by commit e3a8cd20. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c8eb7453
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment