vbo: restructure vbo_save_vertex_list to get more cache hits
authorMarek Olšák <marek.olsak@amd.com>
Sat, 23 Oct 2021 05:19:23 +0000 (01:19 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 29 Oct 2021 07:33:50 +0000 (07:33 +0000)
commit76892c4e46d2a71b7e210a049496e3cf6c48862b
tree8bc67e606f1fd4a16988fe7f821177ea66ae6bd4
parent3835205a0ec1d0b46830911c015d27986c1a5212
vbo: restructure vbo_save_vertex_list to get more cache hits

- Move more stuff into the cold structure.
- Reorder fields for better packing.
- Flatten the gallium and merged nested structures.

Since we have tens of thousands of these, decreasing the size improves
performance by 13%.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13506>
src/mesa/main/dlist.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