dlist: upload vertices in compile_vertex_list
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 16 Jul 2021 11:59:17 +0000 (13:59 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 2 Aug 2021 09:13:16 +0000 (11:13 +0200)
commite012b34e610f2ef64ebf97227e6c16339ef14136
tree5cb536c1f5b62064b4b776cec11d9d7ad5235fdd
parentf86faee9f4925c0c90ef27518c570a4282b46d4c
dlist: upload vertices in compile_vertex_list

Previously vertices were uploaded on-the-fly: each time
the position attribute was set, the newly added vertex
was copied to the mapped bo.

Replace this with a plain RAM buffer, and do the upload
at the end of compile_vertex_list.

This allows to remove the we-need-to-unmap-the-buffer-
before-drawing special case, but more importantly it
will allow to implement vertices deduplication in the
next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11927>
src/mesa/vbo/vbo_save.c
src/mesa/vbo/vbo_save.h
src/mesa/vbo/vbo_save_api.c
src/mesa/vbo/vbo_save_draw.c
src/mesa/vbo/vbo_save_loopback.c