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

Edmondo Tommasina edmondo.tommasina at gmail.com
Tue Mar 28 18:58:57 UTC 2017


On Mon, Mar 27, 2017 at 11:32 PM, Eric Anholt <eric at anholt.net> wrote:
> Edmondo Tommasina <edmondo.tommasina at gmail.com> writes:
>
>> 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.
>
> So you want to set this environment variable so you can avoid passing
> things as environment variables?  That doesn't seem like a strong enough
> justification for the patch, to me.

Right. But well, this was the weakest justification of the three I've
given. Anyways, I agree :)

Any opinion about the possibility to skip the load of ~/.drirc with
the variable? Could this be useful?

This patch probably should have been an RFC. I'll post a v3 of the
patch later with the changes hinted by Gustaw.

Thanks
edmondo


More information about the mesa-dev mailing list