summaryrefslogtreecommitdiff
path: root/ast_function.cpp
AgeCommit message (Collapse)Author
2010-06-23Generate errors for empty constructors instead of assertingIan Romanick
This causes the following tests to pass: glslparsertest/glsl2/constructor-10.vert
2010-06-23Fix multiple usage of an rvalue in constructor component splitting.Eric Anholt
Store the thing in a variable and deref it for each swizzle if we have to. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-06-22Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL.Eric Anholt
2010-06-11Use statically typed ir_constant constructors wherever possibleIan Romanick
2010-06-11Matrix and vector constructors with a single constant scalar are constantIan Romanick
2010-06-11Remove redundant type checks for constant constructorsIan Romanick
All of the cases (e.g., arrays and structures) that were being filtered by these tests were already filtered by the earlier is_numeric and is_boolean tests.
2010-06-11Do simple constant folding while processing function call parametersIan Romanick
2010-06-11Detect and process constant record constructorsIan Romanick
2010-06-11Move parameter processing out of match_function_by_nameIan Romanick
Eventually code that processes constant structure constructors will need to use the processed list of parameters.
2010-06-11Constant-fold constructor parameters after type conversionIan Romanick
This causes the following tests to pass: glslparsertest/shaders/CorrectMatComma2.frag One of the incorrect errors in glslparsertest/shaders/CorrectComma.frag is also eliminated.
2010-06-11Make constructors with all constant parameters generate in-line constantsIan Romanick
2010-06-11Derefence components of constants smarterIan Romanick
During generation of calls to constructors, derefernce constants by creating new constants instead of creating dereferences.
2010-06-11Use ir_unop_b2i when converting a bool-to-int and add a missing breakIan Romanick
The previous code just had dumb cut-and-paste errors.
2010-05-26Begin refactoring ir_dereferenceIan Romanick
Create separate subclasses of ir_dereference for variable, array, and record dereferences. As a side effect, array and record dereferences no longer point to ir_variable objects directly. Instead they each point to an ir_dereference_variable object. This is the first of several steps in the refactoring process. The intention is that ir_dereference will eventually become an abstract base class.
2010-05-10Convert ast_node use of simple_node to exec_list and exec_nodeIan Romanick
2010-05-10Store AST function call parameters in expressionsIan Romanick
Previously the list of function call parameters was stored as a circular list in ast_expression::subexpressions[1]. They are now stored as a regular list in ast_expression::expressions.
2010-04-28glsl_type::generate_constructor_prototype now generates the function tooIan Romanick
Also, change the name of the method to generate_constructor.
2010-04-07Clarify the types of various exec_list in ir.hEric Anholt
2010-04-02Use glsl_type::element_type to get the type of array elementsIan Romanick
2010-04-02Ensure that 'in' and 'inout' formal parameters are valid lvaluesIan Romanick
This causes the following tests to pass: glslparsertest/shaders/function10.frag
2010-04-02Add bool/int conversion as IR operations.Eric Anholt
Fixes constructor-09.glsl and CorrectParse2.frag.
2010-04-02Add conversion of bool to float as an IR operation to match int to float.Eric Anholt
2010-03-31Generate array constructor callsIan Romanick
2010-03-31Refactor parts of match_function_by_name into process_parameters and ↵Ian Romanick
process_call These will be used in the functions that implement calls to array constructors.
2010-03-31Reject array constructor calls in GLSL 1.10Ian Romanick
2010-03-31Use ast_type_specifier::glsl_type to get the type of a constructorIan Romanick
This is the first baby step towards getting array constructors working.
2010-03-29Allow single-component constructorsIan Romanick
This causes the following tests to pass: glslparsertest/shaders/CorrectVersion.V110.frag shaders/glsl-vs-sqrt-zero.frag shaders/glsl-vs-sqrt-zero.vert 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/attribute1.vert glslparsertest/shaders/attribute2.vert glslparsertest/shaders/main2.vert
2010-03-26Initial implementation of constructor handling codeIan Romanick
All of the scalar, vector, and matrix constructors *except* "from bool" constructors should be handled. Array and structure constructors are also not yet handled.
2010-03-26Add new abstract ir_rvalue class; rework accordingly.Kenneth Graunke
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-23Begin processing constructorsIan Romanick
Right now, reject constructors for samplers because the are illegal.
2010-03-19Use glsl_symbol_table instead of using _mesa_symbol_table directlyIan Romanick
2010-03-15Factor guts of function matching code out to match_function_by_nameIan Romanick
This function will be used for matching some types of constructors as well.
2010-03-15Move ast_function_expression::hir to ast_function.cppIan Romanick