glx: Clean up fbconfig attribute handling
authorAdam Jackson <ajax@redhat.com>
Thu, 25 Mar 2021 17:51:51 +0000 (13:51 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Apr 2021 22:58:58 +0000 (22:58 +0000)
commit2f9dd4170113b47e2628f2bd4c2be35f2edda9d0
tree322a049ff909c70f31050ad1e0ae507d16669cf6
parenta7474f19d4a5312544918c07407ca27e2c79ead0
glx: Clean up fbconfig attribute handling

Move the macros defining the expected number of attributes into the same
file as their consumer, remove a pointless maximum, and allocate more
space for attribs on the stack to avoid malloc in the common case.
glxext.c knows about 46 config attribs, 46 - 18 = 28, round up to 32 to
future proof a bit.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992>
src/glx/glxconfig.h
src/glx/glxext.c