Module: Mesa Branch: staging/22.3 Commit: 7cb716a40c899c5bc2ab6a569802ebdba821538a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7cb716a40c899c5bc2ab6a569802ebdba821538a
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Tue Jan 17 10:13:00 2023 +0100 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: a08baaff976 ("vbo/dlist: fix indentation in vbo_save_api.c") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748> (cherry picked from commit 491f6b138ecbe938471f7ee1bc339b32c61eed07) --- .pick_status.json | 2 +- src/mesa/vbo/vbo_save_api.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 5fb9dd15af9..a6c02e3d43b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -31,7 +31,7 @@ "description": "vbo: remove bogus assert", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "a08baaff9764372c29d89886bc1331343d4273bf" }, diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index a41d518a5db..a782e210563 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -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)
