wined3d: Also load the index buffer in wined3d_context_vk_apply_draw_state() if STATE_INDEXBUFFER was invalidated.

Otherwise we might try to bind a NULL buffer if the index buffer was not
previously loaded.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-05-27 20:25:36 +04:30 committed by Alexandre Julliard
parent 3da7d9d6bc
commit 2d22715561

View file

@ -2878,7 +2878,7 @@ VkCommandBuffer wined3d_context_vk_apply_draw_state(struct wined3d_context_vk *c
context_invalidate_state(&context_vk->c, STATE_STREAMSRC);
}
if (indexed)
if (indexed || (wined3d_context_is_graphics_state_dirty(&context_vk->c, STATE_INDEXBUFFER) && state->index_buffer))
{
wined3d_buffer_load(state->index_buffer, &context_vk->c, state);
if (!wined3d_buffer_vk(state->index_buffer)->bo_user.valid)