Module: wine Branch: master Commit: 2d22715561c1d4cb472a8aa0fc47eb4e203d90d8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=2d22715561c1d4cb472a8aa0f...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed May 27 20:43:36 2020 +0430
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
---
dlls/wined3d/context_vk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index c5f2789f7f..5ca22bd113 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -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)