glsl: Make the standalone compiler accept '.glsl' files.

These ought to be treated as 'any stage', but for now, they're just
treated as vertex shaders.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Kenneth Graunke 2012-04-16 14:40:45 -07:00
parent a5e95a419e
commit 7e35d97a02

View file

@ -238,7 +238,7 @@ main(int argc, char **argv)
usage_fail(argv[0]);
const char *const ext = & argv[optind][len - 5];
if (strncmp(".vert", ext, 5) == 0)
if (strncmp(".vert", ext, 5) == 0 || strncmp(".glsl", ext, 5) == 0)
shader->Type = GL_VERTEX_SHADER;
else if (strncmp(".geom", ext, 5) == 0)
shader->Type = GL_GEOMETRY_SHADER;