[Piglit] [PATCH 2/5] shader_runner: Use integers for GL and GLSL versions
Eric Anholt
eric at anholt.net
Wed Nov 14 13:18:58 PST 2012
Ian Romanick <idr at freedesktop.org> writes:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> In floating point, 3.1 is actually 3.0999999999, and that's just
> awsome for comparing GL versions.
> + sscanf(line, "%u.%u", &major, &minor);
> +
> + /* This hack is so that we can tell the difference between GL versions
> + * and GLSL versions. All GL versions increment by ".1", and all GLSL
> + * versions increment by ".10".
> + */
> + if (minor >= 10) {
> + *version = (major * 10) + (minor / 10);
> + } else {
> + *version = (major * 10) + minor;
> + }
> }
Could glsl versions please be stored as a number like "110"? It's what
we use in Mesa, and it's what #version wants.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20121114/84d7d866/attachment.pgp>
More information about the Piglit
mailing list