summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-04-02Make built-in gl_TexCoord available in vertex and fragment shadersIan Romanick
2010-04-02Fix matching of integer function parametersIan 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-04-02Add PASS / FAIL annotations to tests missing them.Eric Anholt
This tricked my import of the tests into piglit.
2010-04-02Test that invalid quailfiers aren't used on variables in GLSL 1.10.Eric Anholt
2010-04-02Allow array dereferences to be considered as lvalues.Eric Anholt
Fixes glsl-vs-arrays.vert and glsl-vs-mov-after-deref.vert. Regresses parser3.frag which was failing for the wrong reason.
2010-04-02Test for the type being different in parameter_lists_match.Eric Anholt
Fixes CorrectFuncOverload.frag.
2010-04-02Add some more operations to ir_constant_expression.cpp.Eric Anholt
2010-04-02Make ir_constant_expression.cpp support multi-component types.Eric Anholt
2010-04-02Simplify ir_constant_expression.cpp by factoring operand computation out.Eric Anholt
2010-04-02Reject non-float varyings.Eric Anholt
Fixes varying2.frag.
2010-04-02Remove fake ir_binop_logic_not. I think you meant ir_unop_logic_not.Eric Anholt
2010-04-02Handle logic not in constant expression evaluation.Eric Anholt
2010-04-02Fix error handling of logic operators.Eric Anholt
They were always throwing a type error because type wasn't being set.
2010-04-02Emit errors for unfinished ast_to_hir expression operations.Eric Anholt
2010-04-02Fix ast_logic_not handling to be unary, not binary.Eric Anholt
2010-04-02Add errors for type results of other expressions.Eric Anholt
2010-04-02Emit errors from failure in arithmetic_result_type.Eric Anholt
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-04-02Start trying to fill in a few bits of ir_constant_expression.cppEric Anholt
This makes a little progress on CorrectParse2.frag.
2010-04-02Compute the constant value of a constant initializer.Eric Anholt
Fixes constFunc.frag.
2010-04-02Allow initializers of constant values to succeed.Eric Anholt
This regresses constFunc.frag, but that's just unexpectedly passing because of the FINISHME just above.
2010-04-02Don't create a parameter declaration for a (void) parameter.Eric Anholt
Fixes segfaults in a shader consisting of just: void main(void) { } Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-04-02Remove ast_node::typeIan Romanick
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-01Track max accessed array element, reject additional out-of-bounds accessesIan Romanick
For unsized arrays, we can't flag out-of-bounds accesses until the array is redeclared with a size. Track the maximum accessed element and generate an error if the declaration specifies a size that would cause that access to be out-of-bounds. This causes the following tests to pass: glslparsertest/shaders/array10.frag
2010-04-01Begin processing ast_array_index nodesIan Romanick
This causes the following tests to pass: glslparsertest/shaders/parser3.frag glslparsertest/shaders/varying3.frag (also generates spurious error)
2010-04-01Fix type handling in ir_dereference array dereference constructorIan Romanick
2010-04-01Allow unsized arrays to be redeclared with a sizeIan Romanick
Test glslparsertest/shaders/array11.frag now passes for the right reason.
2010-04-01Add glsl_type::element_type and glsl_type::array_size queriesIan Romanick
The former gets the type of elements in an array, and the later gets the declared size, if any, of the array.
2010-03-31Set source locations on AST nodes so error messages print locations.Kenneth Graunke
I haven't verified that these are all correct, but it's still a lot better than not having anything. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-03-31Add ast_function::hirIan Romanick
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-31Fix exec_list::move_nodes_to when the source list is emptyIan Romanick
2010-03-31Use ir_variable::clone to copy parameters to the function bodyIan Romanick
Several other code movements were also done. This partitions this function into two halves. The first half processes the prototype part, and the second have processes the actual function definition. The coming patch series will parition ast_function_definition::hir into (at least) two separate functions.
2010-03-31Add ir_variable::cloneIan Romanick
2010-03-31Minor cleanups in ast_function_definition::hirIan Romanick
2010-03-31Generate array constructor callsIan Romanick
2010-03-31Add ir_function_signature::function_nameIan Romanick
2010-03-31Make ir_function::signatures privateIan Romanick
2010-03-31Add ir_function::iterator to iterate over function signaturesIan Romanick
2010-03-31Use ir_function::add_signature to create link between function and signatureIan Romanick
ir_function_signature now has a pointer back to the ir_function that owns it.
2010-03-31Add glsl_type::generate_constructor_prototypeIan Romanick
Generates a symbol table entry and the IR approximation of a prototype for a type's constructor. Currently only arrays are supported.
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-31Move type_specifier_to_glsl_type to ast_type_specifier::glsl_typeIan Romanick
This make is easily accessible from other modules.
2010-03-31More array declaration testsIan Romanick
2010-03-31Fix big dumbness in glsl_type::get_array_instanceIan Romanick
hash_table_insert needs to keep the key so that it compare keys on a following hash_table_find call. Since key was allocated on the stack, it disappeared out from under the hash table.
2010-03-31glsl_type array constructor generate a real name for the typeIan Romanick
2010-03-31Test that const declarations include initializers.Eric Anholt
Fixes dataType6.frag, and also array2.frag for an unexpected but valid reason.
2010-03-31Reject declarations with 'in' or 'out' qualifiersIan Romanick
'in' and 'out' can only be used in function parameter lists or at global scope (1.30 and later). This change enforces this.