summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2018-03-05 09:37:17 -0700
committerBrian Paul <brianp@vmware.com>2018-03-07 08:42:50 -0700
commit6a7cee63b714699b98a31b3e57039d26506465ae (patch)
tree544c52af4779b5fdca49e84f4eba20eb74b27a40
parent9804a083feb676cf810905a6826f708f54a15be2 (diff)
glxinfo/wglinfo: print (110) instead of empty line
The GL_SHADING_LANGUAGE_VERSION query returns an empty string for GLSL 1.10. Instead of printing an empty line, print (110). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105285 Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-rw-r--r--src/xdemos/glinfo_common.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xdemos/glinfo_common.c b/src/xdemos/glinfo_common.c
index 57dccc82..a8ec12e7 100644
--- a/src/xdemos/glinfo_common.c
+++ b/src/xdemos/glinfo_common.c
@@ -745,8 +745,17 @@ print_limits(const char *extensions, const char *oglstring, int version,
glGetIntegerv(GL_NUM_SHADING_LANGUAGE_VERSIONS, &n);
printf(" GL_NUM_SHADING_LANGUAGE_VERSIONS = %d\n", n);
for (i = 0; i < n; i++) {
- printf(" %s\n", (const char *)
- extfuncs->GetStringi(GL_SHADING_LANGUAGE_VERSION, i));
+ const char *lang = (const char *)
+ extfuncs->GetStringi(GL_SHADING_LANGUAGE_VERSION, i);
+ if (lang[0] == 0) {
+ /* The empty string is really GLSL 1.10. Instead of
+ * printing an empty line, print (110). For more info,
+ * see the GL 4.3 compatibility profile specification,
+ * page 628.
+ */
+ lang = "(110)";
+ }
+ printf(" %s\n", lang);
}
}
#endif