From: Ian Romanick Date: Mon, 14 Jun 2010 21:47:26 +0000 (-0700) Subject: Remove ability to read "IR shaders" from stand-alone compiler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54992c30b00b13232641b5d2b6479f005a60abfd;p=mesa.git Remove ability to read "IR shaders" from stand-alone compiler --- diff --git a/main.cpp b/main.cpp index 12fb70315c4..a044646d713 100644 --- a/main.cpp +++ b/main.cpp @@ -33,7 +33,6 @@ #include "glsl_parser.h" #include "ir_optimization.h" #include "ir_print_visitor.h" -#include "ir_reader.h" static char * @@ -104,11 +103,8 @@ main(int argc, char **argv) case 'f': state.target = fragment_shader; break; - case 'i': - state.target = ir_shader; - break; default: - printf("Usage: %s [v|g|f|i] \n", argv[0]); + printf("Usage: %s [v|g|f] \n", argv[0]); return EXIT_FAILURE; } @@ -122,28 +118,18 @@ main(int argc, char **argv) state.loop_or_switch_nesting = NULL; state.ARB_texture_rectangle_enable = true; - if (state.target != ir_shader) { - _mesa_glsl_lexer_ctor(& state, shader, shader_len); - _mesa_glsl_parse(& state); - _mesa_glsl_lexer_dtor(& state); - - foreach_list_const(n, &state.translation_unit) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - - if (!state.error && !state.translation_unit.is_empty()) - _mesa_ast_to_hir(&instructions, &state); - } else { - /* FINISHME: We should initialize this to the max GLSL version supported - * FINISHME: by the driver. At the moment, we don't know what that is. - */ - state.language_version = 130; - _mesa_glsl_initialize_types(&state); - - _mesa_glsl_read_ir(&state, &instructions, shader); + _mesa_glsl_lexer_ctor(& state, shader, shader_len); + _mesa_glsl_parse(& state); + _mesa_glsl_lexer_dtor(& state); + + foreach_list_const(n, &state.translation_unit) { + ast_node *ast = exec_node_data(ast_node, n, link); + ast->print(); } + if (!state.error && !state.translation_unit.is_empty()) + _mesa_ast_to_hir(&instructions, &state); + /* Optimization passes */ if (!state.error && !instructions.is_empty()) { bool progress;