From b511b65123303c2adae7dab3129f8193d7161695 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 12 Aug 2021 14:08:12 +0200 Subject: [PATCH] vbo/dlist: don't force list compilation if out of prim space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/mesa/vbo/vbo_save_api.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index e2fd0093321..4066603b13f 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -936,10 +936,6 @@ end: + save->vertex_store->used; } - if (save->prim_store->used > save->prim_store->size - 6) { - realloc_storage(ctx, 0, -1); - } - /* Reset our structures for the next run of vertices: */ reset_counters(ctx); @@ -1606,7 +1602,7 @@ _ensure_draws_fits_in_storage(struct gl_context *ctx, int primcount, int vertcou bool realloc_vert = save->vertex_size && (save->vert_count + vertcount >= save->max_vert); if (realloc_prim || realloc_vert) { - if (save->vert_count || save->prim_store->used) { + if (realloc_vert && (save->vert_count || save->prim_store->used)) { /* TODO: this really isn't needed. We should realloc only the CPU-side memory. */ compile_vertex_list(ctx); }