<div dir="auto">Could be a patch like this useful for power users?<div dir="auto"><br></div><div dir="auto">Load custom drirc only when specified in env variable.</div><div dir="auto"><br></div><div dir="auto">Patch untested, not even compiled.</div><div dir="auto"><br></div><div dir="auto">edmondo (on mobile phone)</div><div dir="auto"><br></div><div dir="auto"><div style="font-family:sans-serif;font-size:13.696px" dir="auto"><div style="margin:16px 0px"><div><div><div><p>diff --git a/docs/envvars.html b/docs/envvars.html<u></u><u></u></p><p>index cf57ca5..a404ced 100644<u></u><u></u></p><p>--- a/docs/envvars.html<u></u><u></u></p><p>+++ b/docs/envvars.html<u></u><u></u></p><p>@@ -114,6 +114,7 @@ glGetString(GL_SHADING_<wbr>LANGUAGE_VERSION). Valid values are integers, such as<u></u><u></u></p><p>if it's higher than what's normally reported. (for developers only)<u></u><u></u></p><p><li>MESA_GLSL - <a href="shading.html#envvars"><wbr>shading language compiler options</a><u></u><u></u></p><p><li>MESA_NO_MINMAX_CACHE - when set, the minmax index cache is globally disabled.<u></u><u></u></p><p>+<li>MESA_CUSTOM_DRIRC - load custom drirc file.<u></u><u></u></p><p></ul><u></u><u></u></p><p><u></u><u></u></p><p> <u></u><u></u></p><p>diff --git a/src/mesa/drivers/dri/common/<wbr>xmlconfig.c b/src/mesa/drivers/dri/common/<wbr>xmlconfig.c<u></u><u></u></p><p>index a8f7c9b..c36b78a 100644<u></u><u></u></p><p>--- a/src/mesa/drivers/dri/common/<wbr>xmlconfig.c<u></u><u></u></p><p>+++ b/src/mesa/drivers/dri/common/<wbr>xmlconfig.c<u></u><u></u></p><p>@@ -944,8 +944,7 @@ static void parseOneConfigFile (XML_Parser p) {<u></u><u></u></p><p><u></u><u></u></p><p> void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,<u></u><u></u></p><p>                              <wbr>                  int screenNum, const char *driverName) {<u></u><u></u></p><p>-    char *filenames[2] = { SYSCONFDIR "/drirc", NULL};<u></u><u></u></p><p>-    char *home;<u></u><u></u></p><p>+    char *filenames[2] = { SYSCONFDIR "/drirc", getenv("MESA_CUSTOM_DRIRC") };<u></u><u></u></p><p>     uint32_t i;<u></u><u></u></p><p>     struct OptConfData userData;<u></u><u></u></p><p><u></u><u></u></p><p>@@ -956,17 +955,6 @@ void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,<u></u><u></u></p><p>     userData.driverName = driverName;<u></u><u></u></p><p>     userData.execName = GET_PROGRAM_NAME();<u></u><u></u></p><p><u></u><u></u></p><p>-    if ((home = getenv ("HOME"))) {<u></u><u></u></p><p>-              uint32_t len = strlen (home);<u></u><u></u></p><p>-              filenames[1] = malloc(len + 7+1);<u></u><u></u></p><p>-              if (filenames[1] == NULL)<u></u><u></u></p><p>-                  __driUtilMessage ("Can't allocate memory for %s/.drirc.", home);<u></u><u></u></p><p>-              else {<u></u><u></u></p><p>-                  memcpy (filenames[1], home, len);<u></u><u></u></p><p>-                  memcpy (filenames[1] + len, "/.drirc", 7+1);<u></u><u></u></p><p>-              }<u></u><u></u></p><p>-    }<u></u><u></u></p><p>-<u></u><u></u></p><p>     for (i = 0; i < 2; ++i) {<u></u><u></u></p><p>               XML_Parser p;<u></u><u></u></p><p>               if (filenames[i] == NULL)<u></u><u></u></p><p>@@ -987,8 +975,6 @@ void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,<u></u><u></u></p><p>               parseOneConfigFile (p);<u></u><u></u></p><p>               XML_ParserFree (p);<u></u><u></u></p><p>     }<u></u><u></u></p><p>-<u></u><u></u></p><p>-    free(filenames[1]);<u></u><u></u></p><p>}<u></u><u></u></p><p><u></u><u></u></p><p> void driDestroyOptionInfo (driOptionCache *info) {<u></u><u></u></p></div></div></div></div><div style="height:0px"></div></div><div style="font-family:sans-serif;font-size:13.696px;height:80px" dir="auto"></div><br></div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 9, 2017 12:08, "Christian König" <<a href="mailto:deathsimple@vodafone.de">deathsimple@vodafone.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 09.01.2017 um 11:58 schrieb Marek Olšák:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Jan 9, 2017 at 7:25 AM, Michel Dänzer <<a href="mailto:michel@daenzer.net" target="_blank">michel@daenzer.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 09/01/17 03:13 PM, Michel Dänzer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 07/01/17 11:46 PM, Marek Olšák wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>><br>
<br>
~/.drirc is created by the driconf tool (GPL license) and it overrides<br>
system drirc settings and can't be changed by Mesa updates.<br>
This drops support for the tool. It has been a source of major pain<br>
for us and it continues to cause problems.<br>
<br>
If people wanna keep this and enjoy the pain, I will make a v2 that<br>
applies it to radeon drivers only.<br>
<br>
v2: update comments and docs<br>
</blockquote>
The problem is the driconf application (and possibly documentation<br>
recommending its use), not the ~/.drirc file. This is throwing out the<br>
proverbial baby with the bathwater. Fix the problem instead.<br>
</blockquote>
As for something that could be done about this issue in Mesa, how about<br>
adding terminal output about which driconf options are set to what<br>
values from where, enabled e.g. via LIBGL_DEBUG=verbose ?<br>
</blockquote>
That would have no effect on anything whatsoever. The idea is to drop<br>
support for driconf. That can be done by not loading ~/.drirc and<br>
either:<br>
- not loading anything, or<br>
- load a different file from HOME instead (e.g. ~/.mesarc)<br>
</blockquote>
<br>
I would start slower and at-least allow for a grace period or getting rid of this.<br>
<br>
E.g. if ~/.drirc is present give a big warning on stderr that this is deprecated for at least one major release.<br>
<br>
If we then find that we need a per user configuration file we can still add support for ~/.mesarc.<br>
<br>
But in general I agree that file caused quite some pain for questionable gain.<br>
<br>
Regards,<br>
Christian.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
driconf uses GPL, which is not compatible with X.Org and Mesa.<br>
<br>
Marek<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote>
<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>