diff options
author | Brian Paul <[email protected]> | 2018-01-23 10:48:51 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-24 10:12:49 -0700 |
commit | 365a48abddcabf6596c2e34a784d91c8ab929918 (patch) | |
tree | eca45ef69529abb1446c3ef04f366545851b51f0 /src/mesa/vbo/vbo_save_draw.c | |
parent | 2123bd2805c3c3dc23afd5322084fa0dd209dedb (diff) |
vbo: fix incorrect min/max_index values in display list draw call
This fixes another regression from commit 8e4efdc895ea ("vbo: optimize
some display list drawing"). The problem was the min_index, max_index
values passed to the vbo drawing function were not computed to compensate
for the biased prim::start values.
https://bugs.freedesktop.org/show_bug.cgi?id=104746
https://bugs.freedesktop.org/show_bug.cgi?id=104742
https://bugs.freedesktop.org/show_bug.cgi?id=104690
Tested-by: Clayton Craft <[email protected]>
Fixes: 8e4efdc895ea ("vbo: optimize some display list drawing")
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_draw.c')
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index 3a6083fdf45..8cfe10bdc55 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -325,13 +325,14 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) _mesa_update_state(ctx); if (node->vertex_count > 0) { + GLuint min_index = node->start_vertex; + GLuint max_index = min_index + node->vertex_count - 1; vbo_context(ctx)->draw_prims(ctx, node->prims, node->prim_count, NULL, GL_TRUE, - 0, /* Node is a VBO, so this is ok */ - node->vertex_count - 1, + min_index, max_index, NULL, 0, NULL); } } |