summaryrefslogtreecommitdiff
path: root/src/glsl/apps/compile.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-26 17:47:59 -0700
committerEric Anholt <eric@anholt.net>2010-07-26 17:53:27 -0700
commitafe125e0a18ac3886c45c7e6b02b122fb2d327b5 (patch)
tree78621707e71154c0b388b0baacffc26432b7e992 /src/glsl/apps/compile.c
parentd64343f1ae84979bd154475badf11af8a9bfc2eb (diff)
parent5403ca79b225605c79f49866a6497c97da53be3b (diff)
Merge remote branch 'origin/master' into glsl2
This pulls in multiple i965 driver fixes which will help ensure better testing coverage during development, and also gets past the conflicts of the src/mesa/shader -> src/mesa/program move. Conflicts: src/mesa/Makefile src/mesa/main/shaderapi.c src/mesa/main/shaderobj.h
Diffstat (limited to 'src/glsl/apps/compile.c')
-rw-r--r--src/glsl/apps/compile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c
index 21c2b7617e..3aa4fd4d53 100644
--- a/src/glsl/apps/compile.c
+++ b/src/glsl/apps/compile.c
@@ -37,7 +37,7 @@ static void
usage(void)
{
printf("Usage:\n");
- printf(" compile fragment|vertex <source> <output>\n");
+ printf(" compile fragment|vertex|geometry <source> <output>\n");
}
int
@@ -65,6 +65,8 @@ main(int argc,
shader_type = 1;
} else if (!strcmp(argv[1], "vertex")) {
shader_type = 2;
+ } else if (!strcmp(argv[1], "geometry")) {
+ shader_type = 3;
} else {
usage();
return 1;
@@ -80,6 +82,9 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
+ if (size == -1) {
+ return 1;
+ }
fseek(in, 0, SEEK_SET);
out = fopen(argv[3], "w");