[Mesa-dev] [PATCH 2/2] mesa: load a user defined drirc file specified via an environment variable

Edmondo Tommasina edmondo.tommasina at gmail.com
Mon Mar 27 20:18:17 UTC 2017


On Mon, Mar 27, 2017 at 6:05 PM, Eric Anholt <eric at anholt.net> wrote:
> Edmondo Tommasina <edmondo.tommasina at gmail.com> writes:
>
>> Define a new MESA_USER_DRIRC environment variable to load a customized
>> drirc file.
>>
>> When the variable is not defined, nothing changes and the ${HOME}/.drirc
>> file will be loaded.
>>
>> If the variable is set to a file, this file will be loaded instead of
>> the the ${HOME}/.drirc.
>>
>> Example: MESA_USER_DRIRC=~/glthread.drirc glxgears
>>
>> If the variable is set to nothing, it avoids to load the ${HOME}/.drirc
>> file.
>>
>> Example: MESA_USER_DRIRC= glxgears
>
> Could you extend the commit message to describe what problem is being
> solved?  Why wouldn't you just customize your .drirc, since it's in your
> homedir already?

I've posted a second version of the patch, trying to better document the
possible generic usage of the variable.

My use: I don't have a ~/.drirc file since I prefer to have my desktop
running with the default mesa setting (/etc/drirc). If the ~/.drirc file
would exist, it would impact all the applications started with my
user and not only the one I want to test. This is potentially a little
problem being solved.

For me it's useful when I test/benchmark something: I like to use
prepared config file just for this kind of test, instead of passing
a list of env variables.

What can be a "feature" of this patch is to run an application and
disabling the load of an existing ~/.drirc file.

I hope I could clarify it a bit.

Thanks
edmondo


More information about the mesa-dev mailing list