nir/spirv: Use a C99-style initializer for structure fields
[mesa.git] / src / glsl / main.cpp
index 58651df10a05d1f4cb191aae54768bfcf3ed30c4..df93a013edeb6622abac656b044f0b094e00b3e5 100644 (file)
@@ -38,7 +38,6 @@
 #include "program/hash_table.h"
 #include "loop_analysis.h"
 #include "standalone_scaffolding.h"
-#include "util/strtod.h"
 
 static int glsl_version = 330;
 
@@ -47,8 +46,6 @@ initialize_context(struct gl_context *ctx, gl_api api)
 {
    initialize_context_to_defaults(ctx, api);
 
-   _mesa_locale_init();
-
    /* The standalone compiler needs to claim support for almost
     * everything in order to compile the built-in functions.
     */
@@ -207,6 +204,8 @@ initialize_context(struct gl_context *ctx, gl_api api)
    }
 
    ctx->Const.GenerateTemporaryNames = true;
+   ctx->Const.MaxPatchVertices = 32;
+
    ctx->Driver.NewShader = _mesa_new_shader;
 }
 
@@ -276,7 +275,7 @@ usage_fail(const char *name)
 {
 
    const char *header =
-      "usage: %s [options] <file.vert | file.geom | file.frag>\n"
+      "usage: %s [options] <file.vert | file.tesc | file.tese | file.geom | file.frag | file.comp>\n"
       "\n"
       "Possible options are:\n";
    printf(header, name);
@@ -376,6 +375,10 @@ main(int argc, char **argv)
       const char *const ext = & argv[optind][len - 5];
       if (strncmp(".vert", ext, 5) == 0 || strncmp(".glsl", ext, 5) == 0)
         shader->Type = GL_VERTEX_SHADER;
+      else if (strncmp(".tesc", ext, 5) == 0)
+        shader->Type = GL_TESS_CONTROL_SHADER;
+      else if (strncmp(".tese", ext, 5) == 0)
+        shader->Type = GL_TESS_EVALUATION_SHADER;
       else if (strncmp(".geom", ext, 5) == 0)
         shader->Type = GL_GEOMETRY_SHADER;
       else if (strncmp(".frag", ext, 5) == 0)