vbo: remove bogus assert

grow_vertex_storage may call wrap_filled_vertex, which will
trigger the assert incorrectly because the new size will be
smaller than 'new_size' but it's correct because
'vertex_store->used' has been reset to 0.

Fixes: a08baaff97 ("vbo/dlist: fix indentation in vbo_save_api.c")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748>
(cherry picked from commit 491f6b138e)
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2023-01-17 10:13:00 +01:00 committed by Eric Engestrom
parent 90e1c36baa
commit 474f6f60c0
2 changed files with 2 additions and 5 deletions

View file

@ -2947,7 +2947,7 @@
"description": "vbo: remove bogus assert",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "a08baaff9764372c29d89886bc1331343d4273bf"
},

View file

@ -1336,11 +1336,8 @@ do { \
save->vertex_store->used += save->vertex_size; \
unsigned used_next = (save->vertex_store->used + \
save->vertex_size) * sizeof(float); \
if (used_next > save->vertex_store->buffer_in_ram_size) { \
if (used_next > save->vertex_store->buffer_in_ram_size) \
grow_vertex_storage(ctx, get_vertex_count(save)); \
assert(used_next <= \
save->vertex_store->buffer_in_ram_size); \
} \
} \
} while (0)