glsl: Make the standalone compiler accept '.glsl' files.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 16 Apr 2012 21:40:45 +0000 (14:40 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 17 Apr 2012 23:04:57 +0000 (16:04 -0700)
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>
src/glsl/main.cpp

index d43bf1a74636320afe8d6f02f77976d147935832..3231b1be936bb888e9120984d6fb43d0c9ba0fe5 100644 (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;