Bug 76694 - Inconsistent behaviour of LIBGL_DEBUG
Summary: Inconsistent behaviour of LIBGL_DEBUG
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-27 15:21 UTC by Stefan Brüns
Modified: 2018-04-23 23:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Stefan Brüns 2014-03-27 15:21:40 UTC
Mesa documentation states the following:

./docs/libGL.txt:stderr if the LIBGL_DEBUG environment variable is defined.
./docs/envvars.html:<li>LIBGL_DEBUG - If defined debug information will be printed to stderr.

i.e. the corresponding codes check "if (getenv("LIBGL_DEBUG")) ...".

On the other hand, the loader code in src/glx/dri_common.c has a default log level of "_LOADER_WARNING", i.e. messages with log level WARNING and FATAL will be logged.

To lower the log level, LIBGL_DEBUG=quiet can be used for the loader, which in turn increases the log level for the rest of the library.
Comment 1 Timothy Arceri 2018-04-23 03:55:18 UTC
I'm not sure what you want here, so I'm going to close this bug report. If you think it should work differently please send a patch to the list for discussion. Thanks.
Comment 2 Stefan Brüns 2018-04-23 14:17:50 UTC
The important part is some code parts check for *defined*, while others check for a specific value, i.e. "quiet" and "verbose"

https://github.com/anholt/mesa/blob/master/src/glx/dri_common.c#L59
Comment 3 Timothy Arceri 2018-04-23 23:18:38 UTC
(In reply to Stefan Brüns from comment #2)
> The important part is some code parts check for *defined*, while others
> check for a specific value, i.e. "quiet" and "verbose"
> 
> https://github.com/anholt/mesa/blob/master/src/glx/dri_common.c#L59

Right but I don't think anyone cares enough to change this. Feel free to submit a patch to the mailing list and see what the other devs have to say, but we tend not to alter how these environment vars operate since people have memorised, scripted them etc.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.