Commit graph

19 commits

Author SHA1 Message Date
Eric Anholt
62735694a1 Add a constant folding optimization pass. 2010-04-06 11:42:31 -07:00
Ian Romanick
03d3f3ab71 Remove ast_node::type
It isn't a type (is was enum specifying the kind of node), it was
unused, and it was easily confused with actual type fields.  Kill with fire.
2010-04-02 11:05:16 -07:00
Ian Romanick
92318a9479 Add ast_function::hir
ast_function::hir consists of bits pulled out of
ast_function_definition::hir.  In fact, the later uses the former to
do a lot of its processing.  Several class private data fields were
added to ast_function to facilitate communicate between the two.

This causes the following tests to pass:

    glslparsertest/shaders/CorrectModule.frag

This causes the following tests to fail.  These shaders were
previously failing to compile, but they were all failing for the wrong
reasons.

    glslparsertest/shaders/function9.frag
    glslparsertest/shaders/function10.frag
2010-03-31 18:23:21 -07:00
Ian Romanick
5185a5f7d5 Add generate_temporary to generate an anonymous temporary 2010-03-29 15:20:42 -07:00
Ian Romanick
d14642739e IR print visitor: Remove most of the newlines from the printed output
This makes it a lot easier to read... if you have a really wide display.
2010-03-25 18:40:48 -07:00
Eric Anholt
7c15bb2465 Make the standalone parser return an exit code so we can automate testing. 2010-03-25 14:37:25 -07:00
Ian Romanick
71d0bbfcb2 Disallow passing NULL for state to _mesa_glsl_error
The two places that were still passing NULL had a state pointer to
pass.  Not passing it in these places prevented termination of
compilation of erroneous programs.
2010-03-23 13:21:19 -07:00
Ian Romanick
8bde4cec6b Use glsl_symbol_table instead of using _mesa_symbol_table directly 2010-03-19 11:57:24 -07:00
Ian Romanick
bbddcb3092 Factor ast_type_specifier code out to ast_type.cpp 2010-03-15 14:09:23 -07:00
Ian Romanick
1f58518059 Track generation of errors and halt compilation appropriately 2010-03-11 14:08:33 -08:00
Ian Romanick
d949a9afb0 Move top-level AST to HIR conversion to _mesa_ast_to_hir 2010-03-10 09:55:22 -08:00
Ian Romanick
8e6cd3bf54 Require the shader target be specified to the driver program 2010-03-10 09:31:30 -08:00
Ian Romanick
1c4156ffac Use ir_print_visitor to dump IR tree 2010-03-10 09:27:03 -08:00
Ian Romanick
0044e7edce Conver IR structures to use exec_list instead of simple_node 2010-03-08 23:44:54 -08:00
Ian Romanick
18238de6c3 Make AST->HIR conversion a method of ast_node, re-enable 2010-03-01 13:49:10 -08:00
Ian Romanick
d59673c9de autoconf for the ... 2010-02-25 17:17:23 -08:00
Ian Romanick
e41a1cd4d5 Replace tacky wrapper macros with tacky in-line type-casts 2010-02-25 12:49:55 -08:00
Ian Romanick
88349b22ca Add ast_expression_bin subclass of ast_expression
The ast_expression_bin subclass is used for all binary expressions
such as addition, subtraction, and comparisons.  Several other
subclasses are soon to follow.
2010-02-22 19:10:25 -08:00
Ian Romanick
d5f4f09e76 Rename .cc files to .cpp 2010-02-22 18:43:08 -08:00
Renamed from glsl_parser_extras.cc (Browse further)