mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 19:20:38 +01:00
dlist: don't handle unmerged draws as merged
The comment was incorrect: we can have N draws using the
same mode with N > 1 (eg: GL_QUAD_STRIP draws
cannot be merged).
This commit fixes the drawing code to use the correct draw
function.
This fixes a hang in Starsector (see issue #5086).
Fixes: b328d8e9bc ("dlist: use an union instead of allocating a 1-sized array")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11978>
This commit is contained in:
parent
0b36c2916d
commit
11d6441b94
1 changed files with 4 additions and 2 deletions
|
|
@ -247,9 +247,11 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data, bool copy_to_c
|
|||
node->merged.start_counts,
|
||||
node->merged.mode,
|
||||
node->merged.num_draws);
|
||||
} else if (node->merged.num_draws) {
|
||||
/* If node->merged.mode is NULL then num_draws is 0 or 1 */
|
||||
} else if (node->merged.num_draws == 1) {
|
||||
ctx->Driver.DrawGallium(ctx, info, 0, &node->merged.start_count, 1);
|
||||
} else if (node->merged.num_draws) {
|
||||
ctx->Driver.DrawGallium(ctx, info, 0, node->merged.start_counts,
|
||||
node->merged.num_draws);
|
||||
}
|
||||
info->index.gl_bo = gl_bo;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue