summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-14 14:47:26 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-14 14:47:26 -0700
commit54992c30b00b13232641b5d2b6479f005a60abfd (patch)
tree65f1786b0997d6c9927193b75c4847a9303eb1cd
parent61d4aa041f800429127aab3263c50cbc6e69ae50 (diff)
Remove ability to read "IR shaders" from stand-alone compiler
-rw-r--r--main.cpp36
1 files changed, 11 insertions, 25 deletions
diff --git a/main.cpp b/main.cpp
index 12fb703..a044646 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] <shader_file>\n", argv[0]);
+ printf("Usage: %s [v|g|f] <shader_file>\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;