mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 11:10:10 +01:00
draw: fix base vertex bug
Move the assignment of draw->start_index into the num_draws loop in draw_pt_arrays() so that it's updated for each primitive we're drawing. Previously, it was only set once to the 0th primitive's start index. This fixes incorrect gl_BaseVertex values when using vkCmdDrawMultiEXT() with more than one VkMultiDrawInfoEXT item. Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19039>
This commit is contained in:
parent
4314949277
commit
0c87909bcf
1 changed files with 2 additions and 1 deletions
|
|
@ -154,6 +154,8 @@ draw_pt_arrays(struct draw_context *draw,
|
|||
draw->pt.user.eltBias = 0;
|
||||
}
|
||||
|
||||
draw->start_index = draw_info[i].start;
|
||||
|
||||
if (count >= first)
|
||||
frontend->run(frontend, draw_info[i].start, count);
|
||||
|
||||
|
|
@ -603,7 +605,6 @@ draw_vbo(struct draw_context *draw,
|
|||
}
|
||||
|
||||
draw->pt.max_index = index_limit - 1;
|
||||
draw->start_index = use_draws[0].start;
|
||||
|
||||
/*
|
||||
* TODO: We could use draw->pt.max_index to further narrow
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue