diff options
author | Fabian Bieler <[email protected]> | 2014-03-20 22:34:42 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-23 00:59:27 +0200 |
commit | 0cfac917554aeb46bd78ba5b5f5ee1c8ed1d68bc (patch) | |
tree | 3c3338e418790ec29ec74f22544625da0e454d71 /src/glsl/main.cpp | |
parent | c53aa26379ccee9d53fe1d1ea9bfa26d4d469618 (diff) |
glsl: make stand-alone compiler work with tessellation shaders.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/main.cpp')
-rw-r--r-- | src/glsl/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp index 23412980dce..df93a013ede 100644 --- a/src/glsl/main.cpp +++ b/src/glsl/main.cpp @@ -204,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; } @@ -273,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); @@ -373,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) |