OSDN Git Service

main/extensions: Add early extension override structures
authorJordan Justen <jordan.l.justen@intel.com>
Sun, 8 Jun 2014 06:54:31 +0000 (23:54 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 16 Jun 2014 16:54:52 +0000 (09:54 -0700)
commitf5ca8c19727c76256785e1a9f44da058fdcfe891
treebe86fc7786aaed9dcbc2dc95d5bfc93c88b59b25
parent8be64fb570b15be1f2daf3545b5e9c3299704914
main/extensions: Add early extension override structures

During the early one_time_init phase of context creation, we
initialize two global gl_extensions structures.

We read the MESA_EXTENSION_OVERRIDE environment variable, and store
positive and negative overrides in two structures:
* struct gl_extensions _mesa_extension_override_enables
* struct gl_extensions _mesa_extension_override_disables

These are filled before the driver initializes extensions and
constants, therefore the driver can make adjustments based on the
desired overrides.

This can be useful during development of a new extension where the
extension is only partially ready. The driver can't actually advertise
support for the extension, but if it sees that the override is set for
the extension, then it can expose more supported parts of the
extension, such as upgrading context constants.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/context.c
src/mesa/main/extensions.c
src/mesa/main/extensions.h