mesa: rewrite glPushAttrib/glPopAttrib to get rid of malloc
authorMarek Olšák <marek.olsak@amd.com>
Sat, 3 Oct 2020 05:13:10 +0000 (01:13 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Dec 2020 11:52:10 +0000 (11:52 +0000)
commit3be42f9ca19d593d374d309f47ebd80abb001a24
tree8c291e13ba4cb1a8fc857f038fb7161b212e6236
parente08b3b74e7f1d8fa22e1797ef4654d9ed6ff0e3a
mesa: rewrite glPushAttrib/glPopAttrib to get rid of malloc

This was inevitable. This gets rid of the malloc/free calls and chaining
each push group in a linked list. Now the whole attribute stack is declared
statically in gl_context.

Yes, this improves performance a lot.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
src/mesa/main/attrib.c
src/mesa/main/mtypes.h