[Mesa-dev] [PATCH 2/4] mesa: introduce the equivalent of MESA_EXTENSION_OVERRIDE in drirc

Martin Peres martin.peres at linux.intel.com
Mon Feb 2 05:51:25 PST 2015


On 02/02/15 11:54, Michel Dänzer wrote:
> On 30.01.2015 23:19, Martin Peres wrote:
>> When both MESA_EXTENSION_OVERRIDE and drirc's mesa_extension_override are
>> set, the environment variable takes precedence.
>>
>> This will be used to fix Unigine Tropics and Sanctuary.
>>
>> Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
> [...]
>
>> diff --git a/src/mesa/drivers/dri/common/xmlpool/t_options.h b/src/mesa/drivers/dri/common/xmlpool/t_options.h
>> index 4e5a721..3332d66 100644
>> --- a/src/mesa/drivers/dri/common/xmlpool/t_options.h
>> +++ b/src/mesa/drivers/dri/common/xmlpool/t_options.h
>> @@ -110,6 +110,10 @@ DRI_CONF_OPT_BEGIN_B(allow_glsl_extension_directive_midshader, def) \
>>           DRI_CONF_DESC(en,gettext("Allow GLSL #extension directives in the middle of shaders")) \
>>   DRI_CONF_OPT_END
>>   
>> +#define DRI_CONF_MESA_EXTENSION_OVERRIDE(def) \
>> +DRI_CONF_OPT_BEGIN(mesa_extension_override, string, def) \
>> +        DRI_CONF_DESC(en,gettext("Allow enabling/disabling a list of GL extensions")) \
>> +DRI_CONF_OPT_END
> Is it just me, or does it seem weird to include "mesa" in the driconf
> option name?

I wanted to keep the name of the environment variable but now that you 
point it out, I agree that it sounds silly. It'll be in my v2.

>
>
>> @@ -603,6 +603,10 @@ _mesa_one_time_init_extension_overrides(void)
>>      int len;
>>      size_t offset;
>>   
>> +   /* the environment variable takes precedence over drirc */
>> +   if (!env_const || strlen(env_const) == 0)
>> +      env_const = ctx->Const.ExtensionOverride;
> The strlen check means MESA_EXTENSION_OVERRIDE='' can't be used to
> disable a corresponding drirc entry, right? I think it might be useful
> if that worked.
Oh, right. That's the remains of me thinking it would make sense to have 
the drirc version take precedence to the user-defined one. As it would 
always be defined, I had to check the length! I'll change that, thanks.



More information about the mesa-dev mailing list