[waffle] [RFC] wflinfo.c: add GLSL version information
Jordan Justen
jordan.l.justen at intel.com
Wed Nov 12 17:07:39 PST 2014
On 2014-11-12 16:20:59, Dylan Baker wrote:
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>
> This returns an error on GLES 1.x, which is expected. Should we do
> something to handle that differently or just return the
> WFLINFO_GL_ERROR?
We should avoid querying this value and attempting to print it if we
know it should not be available.
-Jordan
> src/utils/wflinfo.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
> index c2af4dc..433d0f9 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,
> };
> @@ -549,6 +550,10 @@ print_wflinfo(const struct options *opts)
> if (glGetError() != GL_NO_ERROR || version_str == NULL) {
> 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);
> @@ -561,6 +566,7 @@ 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);
> + printf("OpenGL shading language version string: %s\n", language_str);
>
> int version = parse_version(version_str);
>
> --
> 2.1.3
>
> _______________________________________________
> waffle mailing list
> waffle at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/waffle
More information about the waffle
mailing list