Commit Graph

9 Commits

Author SHA1 Message Date
Ian Romanick f8e31e00b1 Add ir_loop_jump to represent 'break' and 'continue' in loops 2010-04-07 11:42:30 -07:00
Ian Romanick fad607a9be Add ir_loop to represent loops
This touches a lot of files because everything derived from ir_visitor
has to be updated.  This is the primary disadvantage of the visitor pattern.
2010-04-07 11:41:50 -07:00
Ian Romanick 3c6fea3048 Implement ir_if (for if-statments) and conversion from AST
The following tests now pass:

    glslparsertest/shaders/if1.frag
    glslparsertest/shaders/if2.frag

The following tests that used to pass now fail.  It appears that most
of these fail because ast_nequal and ast_equal are not converted to HIR.

    shaders/glsl-unused-varying.frag
    shaders/glsl-fs-sqrt-branch.frag
2010-03-29 15:17:11 -07:00
Kenneth Graunke affc1413ac Move swizzles out of ir_dereference and into their own class.
Also turn generate_swizzle into a static "create" method of the new
class; we'll want to use it for the IR reader as well.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-26 14:00:59 -07:00
Ian Romanick 8c70a62193 IR print visitor: print ir_dereference instructions
Also make a slight change to ir_variable.  The ir_dereference tracks
the number of nested dereferences.  If an ir_variable is visited and
the count is non-zero, just print the name of the variable.
2010-03-25 18:40:36 -07:00
Ian Romanick 9578c87ce2 Implement IR return instructions 2010-03-19 16:44:52 -07:00
Ian Romanick ed45ec6a51 Add ir_call call to represent function calls. 2010-03-11 14:35:37 -08:00
Ian Romanick 986b8f7982 Tell emacs that C++ .h files are C++ 2010-03-10 13:58:12 -08:00
Ian Romanick 78b51b0fdd IR visitor: Add initial version of ir_visitor classes
The ir_visitor class is the abstract base class for all visitors.
ir_print_visitor contains the beginnings of a concrete visitor class
that will print out an IR sequence in a Lisp / Scheme-like syntax.
2010-03-09 16:26:15 -08:00