X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fapps%2Fcompile.c;h=5073b0da827ba5634ed9d68edc1fd1cbc43c3750;hb=da7bd6a90e1fee5c16327338fd251c0f6be34e36;hp=c9a830b9f3ce6f2b8b0d6c7c1b527d58c5fb0b64;hpb=b01ffb12ed82dcf435b186e2aff35e344a8a6ebe;p=mesa.git diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c index c9a830b9f3c..5073b0da827 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 \n"); + printf(" compile fragment|vertex|geometry \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; @@ -79,6 +81,7 @@ main(int argc, fseek(in, 0, SEEK_END); size = ftell(in); + assert(size != -1); fseek(in, 0, SEEK_SET); out = fopen(argv[3], "w"); @@ -134,8 +137,8 @@ main(int argc, return 0; } - if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") || - sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) { + if (sl_pp_context_add_extension(context, "GL_ARB_draw_buffers") || + sl_pp_context_add_extension(context, "GL_ARB_texture_rectangle")) { fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); printf("Error: %s\n", sl_pp_context_error_message(context));