[waffle] [PATCH v2 1/4] waffle utils: add wflinfo utility
Jordan Justen
jljusten at gmail.com
Tue Jan 7 15:12:14 PST 2014
On Mon, Jan 6, 2014 at 10:00 AM, Chad Versace
<chad.versace at linux.intel.com> wrote:
> On Mon, Dec 23, 2013 at 09:48:33PM -0800, Jordan Justen wrote:
>> +static void
>> +print_extensions(bool use_stringi)
>> +{
>> + GLint count = 0, i;
>> + const char *ext;
>> +
>> + printf("OpenGL extensions: ");
>> + if (use_stringi) {
>> + glGetIntegerv(GL_NUM_EXTENSIONS, &count);
>> + if (glGetError() != GL_NO_ERROR) {
>> + printf("GL ERROR");
>
> The space in "GL ERROR" could confuse applications that parse wflinfo's
> output, because extension names do not contain spaces. Let's instead
> print "GL_ERROR".
I was concerned about using GL_ERROR since it looks like something
that could be part of GL.
How about WFLINFO_GL_ERROR?
>> + if (opts->verbose)
>> + print_extensions(need_getstringi);
>
> Hmm... I believe that wflinfo should print extensions by default.
> Usually, a verbose flag enables printing non-essential info, but
> extensions are not non-essential. Extensions comprise critical
> information about the context, perhaps just as significant as the
> context version.
>
> Why did you choose to print the extensions only with verbose? Let's
> discuss it at the office.
I would say that 95% of the time I run glxinfo, I just want to see the
OpenGL version string. But, 100% of the time, I have to pipe it to
less or grep to pick that out.
Although, the second most often thing I look for is the extensions
list, it still is reasonably rare, and quite verbose.
I think we should consider short parameters so:
wflinfo --verbose --platform=glx --api=gl
could be
wflinfo -v -p glx -a gl
Although, even with that change, wflinfo has some parameter usability
issues compared to glxinfo. :)
I think Ken was not impressed on that front, and thought we should
consider something that allows us to run wflinfo with little or no
parameters.
One thing I thought about is if we add output like this:
Waffle platform & api: glx gl
And, then we might consider trying multiple combinations, and the
output could be mapped to a particular platform/api combination.
Maybe if wflinfo is run without parameters, then it would try
everything, and print out info for all combinations that work. (At
that point, printing the extensions list by default for each context
created would produce a lot of output.)
If --platform is used without --api, then we could try all APIs on
that platform, and vise-versa.
-Jordan
More information about the waffle
mailing list