We only convert line strips to lines in certain cases, but were flagging
node->merged.prim as GL_LINES even if we simply copied a GL_LINE_STRIP
prim[0] over without modifying it.
Fixes Piglit's lineloop test (which triggers loop -> strip conversion
earlier in this path, then was incorrectly triggering strip -> list
mode modification with no changes to the underlying data).
Fixes:
310991415ee ("vbo/dlist: implement primitive merging")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8522>
continue;
}
- /* Line strips get converted to lines */
+ /* Line strips may get converted to lines */
if (mode == GL_LINE_STRIP)
mode = GL_LINES;
}
}
} else {
+ /* We didn't convert to LINES, so restore the original mode */
+ mode = original_prims[i].mode;
+
for (unsigned j = 0; j < vertex_count; j++) {
indices[idx++] = original_prims[i].start + j;
}