mesa: rework the way we manage extra_extensions
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 6 Nov 2017 16:14:51 +0000 (16:14 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 16 Nov 2017 14:17:07 +0000 (14:17 +0000)
commit310e4485cba33716899d56ac910054d906701a9c
tree835df80b1547bc62390de5a52b2f279c98f08f1e
parent693682bd015e871f7beca15aeb441c2e1ba76cec
mesa: rework the way we manage extra_extensions

Store pointers to the tokenized strings in the gl_extensions struct.

This way we can reuse them in glGetStringi() while we construct the
really long string only in _mesa_make_extension_string.

Only 16 pointers/strings are stored for now.

v2: Warn only once when we provide more than 16 unk. extensions, rebase

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
src/mesa/main/extensions.c
src/mesa/main/mtypes.h