From f5ca8c19727c76256785e1a9f44da058fdcfe891 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sat, 7 Jun 2014 23:54:31 -0700 Subject: 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 Reviewed-by: Anuj Phogat --- src/mesa/main/context.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index f350788500c..244e63edec6 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -396,6 +396,8 @@ one_time_init( struct gl_context *ctx ) assert( sizeof(GLint) == 4 ); assert( sizeof(GLuint) == 4 ); + _mesa_one_time_init_extension_overrides(); + _mesa_get_cpu_features(); for (i = 0; i < 256; i++) { -- cgit v1.2.3