dri2: Hard-code the DRI2 version
[mesa.git] / src / glsl / main.cpp
index d43bf1a74636320afe8d6f02f77976d147935832..64c2496eba8802ab7868f178de3e35e3114a39f8 100644 (file)
  */
 #include <getopt.h>
 
+/** @file main.cpp
+ *
+ * This file is the main() routine and scaffolding for producing
+ * builtin_compiler (which doesn't include builtins itself and is used
+ * to generate the profile information for builtin_function.cpp), and
+ * for glsl_compiler (which does include builtins and can be used to
+ * offline compile GLSL code and examine the resulting GLSL IR.
+ */
+
 #include "ast.h"
 #include "glsl_parser_extras.h"
 #include "ir_optimization.h"
@@ -238,7 +247,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;