Eric Anholt
c22c40015d
Implement the first builtin function: exp().
15 лет назад
Eric Anholt
c4f86d3b80
Make read-only variables not be considered lvalues.
This should fix tests trying to assign to builtin "in" variables, and
will also be relied on for post_inc/dec handling.
15 лет назад
Eric Anholt
3c36b2df7c
Add constructors for immediate hir constants.
This will make ast_to_hir for inc/dec easier.
15 лет назад
Eric Anholt
e65e12fdbc
IR print visitor: Print out something for the operator.
15 лет назад
Ian Romanick
93614bc4b9
Add hack ir_call::callee_name to get the name of the called function
15 лет назад
Ian Romanick
9878c6518f
Add ir_call::iterator to iterate over actual parameters
15 лет назад
Ian Romanick
6c86ea8adc
Add unary operator to convert unsigned integer to float
15 лет назад
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>
15 лет назад
Kenneth Graunke
fb9fb5f51d
Add new abstract ir_rvalue class; rework accordingly.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
15 лет назад
Kenneth Graunke
44e1dfa2df
Replace "mode" type tag with virtual as_foo() downcasting functions.
These should work well even in a non-flat IR hierarchy.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
15 лет назад
Ian Romanick
9546997736
Add dereference constructor for array element dereferences
This should have gone in before the previous commit.
15 лет назад
Kenneth Graunke
f25a5ad939
Widen num_components to handle vec4 correctly.
15 лет назад
Kenneth Graunke
904872372e
Typo fixes: de/re/ference.
15 лет назад
Ian Romanick
2f4240fb02
Add method to set the swizzle of an ir_dereference
15 лет назад
Ian Romanick
882dad7540
ir_function constructor now takes the function name as a parameter
15 лет назад
Ian Romanick
9e7c34b865
Set the type of a function call to be the return type of the callee
15 лет назад
Ian Romanick
e39cc69fa3
Set, and require, a return type for function signatures
15 лет назад
Ian Romanick
9578c87ce2
Implement IR return instructions
15 лет назад
Ian Romanick
e309a6051d
Add multiple include protection to ir.h
15 лет назад
Ian Romanick
471471f834
Initial pass at resolving function calls
The code is still really rough and *REALLY* incomplete. This at least
passes the first few trivially simple test cases.
15 лет назад
Ian Romanick
ed45ec6a51
Add ir_call call to represent function calls.
15 лет назад
Ian Romanick
d27ec2461b
Fix broken constructor of ir_instruction base class
Make the constructor inline-able, and don't try to initialize it as a
simple_node. It hasn't been derived from simple_node in a long time.
15 лет назад
Ian Romanick
986b8f7982
Tell emacs that C++ .h files are C++
15 лет назад
Ian Romanick
adfb0cd740
IR variable: Initial work to support GLSL built-in variables
15 лет назад
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.
15 лет назад
Ian Romanick
0044e7edce
Conver IR structures to use exec_list instead of simple_node
15 лет назад
Ian Romanick
a87ac255cf
Initial commit. lol
15 лет назад