Commit 2d227155 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Also load the index buffer in wined3d_context_vk_apply_draw_state() if…

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: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3da7d9d6
......@@ -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)
......
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