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? 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); -- 2.1.3 _______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle