summaryrefslogtreecommitdiff
path: root/src/glsl/main.cpp
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-09-08 18:52:27 +0800
committerKenneth Graunke <kenneth@whitecape.org>2010-09-08 04:08:29 -0700
commit1a5b32ca0198488e7d616c8cd968471166a97ef3 (patch)
tree275f8749bceb2967e55465a810a4252aa5cb77b8 /src/glsl/main.cpp
parentdc754586ca84741b4df5b72fd235c4134816854c (diff)
glsl: Support GLSL ES in the standalone compile.
GLSL ES mode is enabled when --glsl-es is passed to glsl_compiler.
Diffstat (limited to 'src/glsl/main.cpp')
-rw-r--r--src/glsl/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 982562c4bb..2a7a7136ff 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -144,12 +144,14 @@ usage_fail(const char *name)
}
+int glsl_es = 0;
int dump_ast = 0;
int dump_hir = 0;
int dump_lir = 0;
int do_link = 0;
const struct option compiler_opts[] = {
+ { "glsl-es", 0, &glsl_es, 1 },
{ "dump-ast", 0, &dump_ast, 1 },
{ "dump-hir", 0, &dump_hir, 1 },
{ "dump-lir", 0, &dump_lir, 1 },
@@ -262,7 +264,7 @@ main(int argc, char **argv)
if (argc <= optind)
usage_fail(argv[0]);
- initialize_context(ctx, API_OPENGL);
+ initialize_context(ctx, (glsl_es) ? API_OPENGLES2 : API_OPENGL);
struct gl_shader_program *whole_program;