diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 111d7b3a8cb..a15c0d5c075 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -625,6 +625,9 @@ compile_vertex_list(struct gl_context *ctx) GLubyte mode = original_prims[i].mode; bool converted_prim = false; unsigned index_size; + bool outputting_quads = !!(ctx->Const.DriverSupportedPrimMask & + (BITFIELD_MASK(PIPE_PRIM_QUADS) | BITFIELD_MASK(PIPE_PRIM_QUAD_STRIP))); + unsigned verts_per_primitive = outputting_quads ? 4 : 3; int vertex_count = original_prims[i].count; if (!vertex_count) { @@ -632,8 +635,8 @@ compile_vertex_list(struct gl_context *ctx) } /* Increase indices storage if the original estimation was too small. */ - if (idx + 3 * vertex_count > max_index_count) { - max_index_count = max_index_count + 3 * vertex_count; + if (idx + verts_per_primitive * vertex_count > max_index_count) { + max_index_count = max_index_count + verts_per_primitive * vertex_count; indices = (uint32_t*) realloc(indices, max_index_count * sizeof(uint32_t)); tmp_indices = all_prims_supported ? NULL : realloc(tmp_indices, max_index_count * sizeof(uint32_t)); } diff --git a/src/panfrost/ci/panfrost-g52-fails.txt b/src/panfrost/ci/panfrost-g52-fails.txt index 2cad34a0363..d99994c2a83 100644 --- a/src/panfrost/ci/panfrost-g52-fails.txt +++ b/src/panfrost/ci/panfrost-g52-fails.txt @@ -498,7 +498,6 @@ spec@!opengl 1.0@gl-1.0-edgeflag-quads,Fail spec@!opengl 1.0@gl-1.0-no-op-paths,Fail spec@!opengl 1.0@gl-1.0-spot-light,Fail spec@!opengl 1.0@rasterpos,Crash -spec@!opengl 1.1@dlist-fdo3129-01,Crash spec@!opengl 1.1@getteximage-formats,Fail spec@!opengl 1.1@linestipple@Factor 2x,Fail spec@!opengl 1.1@linestipple@Factor 3x,Fail