Remove ability to read "IR shaders" from stand-alone compiler
This commit is contained in:
16
main.cpp
16
main.cpp
@@ -33,7 +33,6 @@
|
|||||||
#include "glsl_parser.h"
|
#include "glsl_parser.h"
|
||||||
#include "ir_optimization.h"
|
#include "ir_optimization.h"
|
||||||
#include "ir_print_visitor.h"
|
#include "ir_print_visitor.h"
|
||||||
#include "ir_reader.h"
|
|
||||||
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
@@ -104,11 +103,8 @@ main(int argc, char **argv)
|
|||||||
case 'f':
|
case 'f':
|
||||||
state.target = fragment_shader;
|
state.target = fragment_shader;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
|
||||||
state.target = ir_shader;
|
|
||||||
break;
|
|
||||||
default:
|
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;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +118,6 @@ main(int argc, char **argv)
|
|||||||
state.loop_or_switch_nesting = NULL;
|
state.loop_or_switch_nesting = NULL;
|
||||||
state.ARB_texture_rectangle_enable = true;
|
state.ARB_texture_rectangle_enable = true;
|
||||||
|
|
||||||
if (state.target != ir_shader) {
|
|
||||||
_mesa_glsl_lexer_ctor(& state, shader, shader_len);
|
_mesa_glsl_lexer_ctor(& state, shader, shader_len);
|
||||||
_mesa_glsl_parse(& state);
|
_mesa_glsl_parse(& state);
|
||||||
_mesa_glsl_lexer_dtor(& state);
|
_mesa_glsl_lexer_dtor(& state);
|
||||||
@@ -134,15 +129,6 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if (!state.error && !state.translation_unit.is_empty())
|
if (!state.error && !state.translation_unit.is_empty())
|
||||||
_mesa_ast_to_hir(&instructions, &state);
|
_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);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Optimization passes */
|
/* Optimization passes */
|
||||||
if (!state.error && !instructions.is_empty()) {
|
if (!state.error && !instructions.is_empty()) {
|
||||||
|
Reference in New Issue
Block a user