On Saturday, November 15, 2014 08:47:05 PM Emil Velikov wrote: > Hi Dylan, > On 14/11/14 17:39, Dylan Baker wrote: > > v2: - Don't print for gles1, since gles1 doesn't have a shading language > > and will always return FLINFO_GL_ERROR > > > > Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com> > > --- > > > > This addresses Jordan's comments, but from the point of view of having a > > parsable output not printing the string 'OpenGL shading language...' > > seems suboptimal. Would it be better to add an additional block to the > > assignment if and look for fixed-functions versions and set the value of > > shading langauge to 'Fixed Function' or 'None' instead? > > > I'm not sure how Chad and Jordan feel about it but making gles1's shader > langugage version return "None" sounds good imho. I was looking at your > request at github and I was saying to myself, let me sort remove the > libgbm/libudev & friends linking and I'll get to it. > Seems like you've beaten be to it :] > > -Emil
Well, I'm not much of a C guy, but Chad said, 'cut and paste', so I figured I could cut and paste. I think I like None or Not Available, or something to that effect better, since one of the goals is wflinfo being parsable. I'll spin a v3 on Monday. > > > src/utils/wflinfo.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c > > index c2af4dc..ed1e6f3 100644 > > --- a/src/utils/wflinfo.c > > +++ b/src/utils/wflinfo.c > > @@ -207,6 +207,7 @@ enum { > > GL_VENDOR = 0x1F00, > > GL_RENDERER = 0x1F01, > > GL_VERSION = 0x1F02, > > + GL_SHADING_LANGUAGE_VERSION = 0x8B8C, > > GL_EXTENSIONS = 0x1F03, > > GL_NUM_EXTENSIONS = 0x821D, > > }; > > @@ -550,6 +551,11 @@ print_wflinfo(const struct options *opts) > > version_str = "WFLINFO_GL_ERROR"; > > } > > > > + const char *language_str = (const char *) > > glGetString(GL_SHADING_LANGUAGE_VERSION); > > + if (glGetError() != GL_NO_ERROR || language_str == NULL) { > > + language_str = "WFLINFO_GL_ERROR"; > > + } > > + > > const char *platform = enum_map_to_str(platform_map, opts->platform); > > assert(platform != NULL); > > printf("Waffle platform: %s\n", platform); > > @@ -561,6 +567,10 @@ print_wflinfo(const struct options *opts) > > printf("OpenGL vendor string: %s\n", vendor); > > printf("OpenGL renderer string: %s\n", renderer); > > printf("OpenGL version string: %s\n", version_str); > > + // Do not print WFLINFO_GL_ERROR for gles1, there is not GLSL for GL ES > > 1.x > > + if (strcmp(api, "gles1") != 0) { > > + printf("OpenGL shading language version string: %s\n", > > language_str); > > + } > > > > int version = parse_version(version_str); > > > > >
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle