On 5 March 2018 at 16:53, Brian Paul <bri...@vmware.com> wrote:
> 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
> ---
>  src/xdemos/glinfo_common.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/xdemos/glinfo_common.c b/src/xdemos/glinfo_common.c
> index 57dccc8..f84d1a4 100644
> --- a/src/xdemos/glinfo_common.c
> +++ b/src/xdemos/glinfo_common.c
> @@ -745,8 +745,15 @@ 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).
> +             */
> +            lang = "(110)";
> +         }
From a quick search I cannot spot where the spec says the above.
Yet again, the wiki says some contradicting things (wrt 1.00) relative
to the spec.

Namely:
"if an implementation exposes support for GLSL 1.00 (through
ARB_shading_language_100), then it will return an empty string ("")."
[1]

I'd add a some note/xxx about the extension and merge the patch.

-Emil

[1] https://www.khronos.org/opengl/wiki/GLAPI/glGetString
[2] 
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shading_language_100.txt
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to